Ruby 3.5.0dev (2025-02-22 revision 412997300569c1853c09813e4924b6df3d7e8669)
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#if !defined RUBY_EXPORT && !defined RUBY_NO_OLD_COMPATIBILITY
28# include "ruby/backward.h"
29#endif
30
32
33/* file.c */
34
50VALUE rb_file_s_expand_path(int argc, const VALUE *argv);
51
67
83VALUE rb_file_s_absolute_path(int argc, const VALUE *argv);
84
100
118
137int rb_find_file_ext(VALUE *feature, const char *const *exts);
138
151
167
179
191int rb_is_absolute_path(const char *path);
192
212rb_off_t rb_file_size(VALUE file);
213
214#ifdef RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY
215RBIMPL_ATTR_DEPRECATED_INTERNAL_ONLY()
216#endif
228int rb_path_check(const char *path);
229
231
232#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:74
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:65
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:6588
int rb_path_check(const char *path)
If the PATH_SEPARATOR-separated list of directory names contains the name of a world-writable directo...
Definition file.c:6426
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:4272
VALUE rb_str_encode_ospath(VALUE path)
Converts a string into an "OS Path" encoding, if any.
Definition file.c:252
int rb_is_absolute_path(const char *path)
Queries if the given path is an absolute path.
Definition file.c:6349
int rb_find_file_ext(VALUE *feature, const char *const *exts)
Resolves a feature's path.
Definition file.c:6529
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:4224
rb_off_t rb_file_size(VALUE file)
Queries the file size of the given file.
Definition file.c:2522
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:1620
VALUE rb_file_expand_path(VALUE fname, VALUE dname)
Identical to rb_file_absolute_path(), except it additionally understands ~.
Definition file.c:4211
VALUE rb_file_dirname(VALUE fname)
Strips a file path's last component (and trailing separators if any).
Definition file.c:4890
VALUE rb_file_absolute_path(VALUE fname, VALUE dname)
Maps a relative path to its absolute representation.
Definition file.c:4265
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
Definition nonnull.h:30
Defines RBIMPL_ATTR_PURE.
#define RBIMPL_ATTR_PURE()
Wraps (or simulates) __attribute__((pure))
Definition pure.h:33
#define _(args)
This was a transition path from K&R to ANSI.
Definition stdarg.h:35
Defines VALUE and ID.
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40