Ruby: include/ruby/internal/intern/file.h Source File

Ruby 4.0.5p0 (2026-05-20 revision 64336ffd0ee9e1f4c05891695a3d7b49cb709721)

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
23#include "ruby/internal/attr/nonnull.h"
24#include "ruby/internal/attr/pure.h"
25#include "ruby/internal/dllexport.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
31 RBIMPL_SYMBOL_EXPORT_BEGIN()
32
33/* file.c */
34
35 RBIMPL_ATTR_NONNULL(())
50 VALUE rb_file_s_expand_path(int argc, const VALUE *argv);
51
66 VALUE rb_file_expand_path(VALUE fname, VALUE dname);
67
68 RBIMPL_ATTR_NONNULL(())
83 VALUE rb_file_s_absolute_path(int argc, const VALUE *argv);
84
99 VALUE rb_file_absolute_path(VALUE fname, VALUE dname);
100
117 VALUE rb_file_dirname(VALUE fname);
118
119 RBIMPL_ATTR_NONNULL(())
137int rb_find_file_ext(VALUE *feature, const char *const *exts);
138
150 VALUE rb_find_file(VALUE path);
151
166 VALUE rb_file_directory_p(VALUE _, VALUE path);
167
178 VALUE rb_str_encode_ospath(VALUE path);
179
180 RBIMPL_ATTR_NONNULL(())
181 RBIMPL_ATTR_PURE()
191int rb_is_absolute_path(const char *path);
192
212rb_off_t rb_file_size(VALUE file);
213
214 RBIMPL_SYMBOL_EXPORT_END()
215
216#endif /* RBIMPL_INTERN_FILE_H */
dllexport.h
Tweaking visibility of C variables/functions.
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition dllexport.h:74
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition dllexport.h:65
nonnull.h
Defines RBIMPL_ATTR_NONNULL.
RBIMPL_ATTR_NONNULL
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull)).
Definition nonnull.h:30
pure.h
Defines RBIMPL_ATTR_PURE.
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
value.h
Defines VALUE and ID.
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40