Ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e0ba6b95ab71a441357ed5484e33498)
file.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_FILE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_FILE_H
26#include "ruby/internal/value.h"
27
29
30/* file.c */
31
47VALUE rb_file_s_expand_path(int argc, const VALUE *argv);
48
63VALUE rb_file_expand_path(VALUE fname, VALUE dname);
64
80VALUE rb_file_s_absolute_path(int argc, const VALUE *argv);
81
96VALUE rb_file_absolute_path(VALUE fname, VALUE dname);
97
114VALUE rb_file_dirname(VALUE fname);
115
134int rb_find_file_ext(VALUE *feature, const char *const *exts);
135
147VALUE rb_find_file(VALUE path);
148
163VALUE rb_file_directory_p(VALUE _, VALUE path);
164
175VALUE rb_str_encode_ospath(VALUE path);
176
188int rb_is_absolute_path(const char *path);
189
209off_t rb_file_size(VALUE file);
210
212
213#endif /* RBIMPL_INTERN_FILE_H */
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:106
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:97
VALUE rb_find_file(VALUE path)
Identical to rb_find_file_ext(), except it takes a feature name and is extension at once,...
Definition: file.c:6505
VALUE rb_file_s_absolute_path(int argc, const VALUE *argv)
Identical to rb_file_absolute_path(), except how arguments are passed.
Definition: file.c:4179
VALUE rb_str_encode_ospath(VALUE path)
Converts a string into an "OS Path" encoding, if any.
Definition: file.c:251
int rb_is_absolute_path(const char *path)
Queries if the given path is an absolute path.
Definition: file.c:6270
int rb_find_file_ext(VALUE *feature, const char *const *exts)
Resolves a feature's path.
Definition: file.c:6446
off_t rb_file_size(VALUE file)
Queries the file size of the given file.
Definition: file.c:2559
VALUE rb_file_s_expand_path(int argc, const VALUE *argv)
Identical to rb_file_expand_path(), except how arguments are passed.
Definition: file.c:4131
VALUE rb_file_directory_p(VALUE _, VALUE path)
Queries if the given path is either a directory, or a symlink that (potentially recursively) points t...
Definition: file.c:1645
VALUE rb_file_expand_path(VALUE fname, VALUE dname)
Identical to rb_file_absolute_path(), except it additionally understands ~.
Definition: file.c:4118
VALUE rb_file_dirname(VALUE fname)
Strips a file path's last component (and trailing separators if any).
Definition: file.c:4785
VALUE rb_file_absolute_path(VALUE fname, VALUE dname)
Maps a relative path to its absolute representation.
Definition: file.c:4172
RBIMPL_ATTR_PURE() int rb_io_read_pending(rb_io_t *fptr)
Queries if the passed IO has any pending reads.
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition: nonnull.h:27
Defines RBIMPL_ATTR_PURE.
#define _(args)
This was a transition path from K&R to ANSI.
Definition: stdarg.h:35
Defines VALUE and ID.