Ruby  3.4.0dev (2024-11-22 revision 0989400a925cd201defdca9eb28eb87200b30785)
pathname.h
Go to the documentation of this file.
1 #ifndef RUBY_INTERNAL_ENCODING_PATHNAME_H /*-*-C++-*-vi:se ft=cpp:*/
2 #define RUBY_INTERNAL_ENCODING_PATHNAME_H
27 #include "ruby/internal/value.h"
28 
48 char *rb_enc_path_next(const char *path, const char *end, rb_encoding *enc);
49 
70 char *rb_enc_path_skip_prefix(const char *path, const char *end, rb_encoding *enc);
71 
90 char *rb_enc_path_last_separator(const char *path, const char *end, rb_encoding *enc);
91 
117 char *rb_enc_path_end(const char *path, const char *end, rb_encoding *enc);
118 
119 RBIMPL_ATTR_NONNULL((1, 4))
138 const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc);
139 
140 RBIMPL_ATTR_NONNULL((1, 3))
180 const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc);
181 
183 
184 #endif /* RUBY_INTERNAL_ENCODING_PATHNAME_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:74
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:65
Defines rb_encoding.
int len
Length of the buffer.
Definition: io.h:8
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition: nonnull.h:27
char * rb_enc_path_next(const char *path, const char *end, rb_encoding *enc)
Returns a path component directly adjacent to the passed pointer.
Definition: file.c:3512
const char * ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
Our own encoding-aware version of extname.
Definition: file.c:4982
char * rb_enc_path_last_separator(const char *path, const char *end, rb_encoding *enc)
Returns the last path component.
Definition: file.c:3560
char * rb_enc_path_end(const char *path, const char *end, rb_encoding *enc)
This just returns the passed end basically.
Definition: file.c:3594
char * rb_enc_path_skip_prefix(const char *path, const char *end, rb_encoding *enc)
Seeks for non-prefix part of a pathname.
Definition: file.c:3526
const char * ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc)
Our own encoding-aware version of basename(3).
Definition: file.c:4735
Defines VALUE and ID.