Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
Functions
file.h File Reference

Public APIs related to rb_cFile. More...

#include "ruby/internal/dllexport.h"
#include "ruby/internal/value.h"

Go to the source code of this file.

Functions

VALUE rb_file_s_expand_path (int, const VALUE *)
 
VALUE rb_file_expand_path (VALUE, VALUE)
 
VALUE rb_file_s_absolute_path (int, const VALUE *)
 
VALUE rb_file_absolute_path (VALUE, VALUE)
 
VALUE rb_file_dirname (VALUE fname)
 
int rb_find_file_ext (VALUE *, const char *const *)
 
VALUE rb_find_file (VALUE)
 
VALUE rb_file_directory_p (VALUE, VALUE)
 
VALUE rb_str_encode_ospath (VALUE)
 
int rb_is_absolute_path (const char *)
 

Detailed Description

Public APIs related to rb_cFile.

Author
Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org
Warning
Symbols prefixed with either RBIMPL or rbimpl are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will.
Note
To ruby-core: remember that this header can be possibly recursively included from extension libraries written in C++. Do not expect for instance __VA_ARGS__ is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98.

Definition in file file.h.

Function Documentation

◆ rb_file_absolute_path()

VALUE rb_file_absolute_path ( VALUE  fname,
VALUE  dname 
)

Definition at line 4157 of file file.c.

References check_expand_path_args, expand_path, and EXPAND_PATH_BUFFER.

Referenced by rb_f_require_relative(), and rb_file_s_absolute_path().

◆ rb_file_directory_p()

VALUE rb_file_directory_p ( VALUE  obj,
VALUE  fname 
)

Definition at line 1646 of file file.c.

References Qfalse, Qtrue, S_ISDIR, and stat.

Referenced by Init_Dir(), and Init_File().

◆ rb_file_dirname()

VALUE rb_file_dirname ( VALUE  fname)

◆ rb_file_expand_path()

VALUE rb_file_expand_path ( VALUE  fname,
VALUE  dname 
)

Definition at line 4103 of file file.c.

References check_expand_path_args, expand_path, and EXPAND_PATH_BUFFER.

Referenced by rb_file_s_expand_path().

◆ rb_file_s_absolute_path()

VALUE rb_file_s_absolute_path ( int  argc,
const VALUE argv 
)

Definition at line 4164 of file file.c.

References argc, argv, Qnil, rb_check_arity, and rb_file_absolute_path().

◆ rb_file_s_expand_path()

VALUE rb_file_s_expand_path ( int  argc,
const VALUE argv 
)

Definition at line 4116 of file file.c.

References argc, argv, Qnil, rb_check_arity, and rb_file_expand_path().

◆ rb_find_file()

VALUE rb_find_file ( VALUE  path)

◆ rb_find_file_ext()

int rb_find_file_ext ( VALUE filep,
const char *const ext 
)

◆ rb_is_absolute_path()

int rb_is_absolute_path ( const char *  path)

Definition at line 6177 of file file.c.

References isdirsep.

Referenced by rb_file_expand_path_internal(), rb_find_file(), and rb_find_file_ext().

◆ rb_str_encode_ospath()

VALUE rb_str_encode_ospath ( VALUE  path)