Ruby
2.0.0p598(2014-11-13revision48408)
|
#include "ruby/ruby.h"
#include "ruby/encoding.h"
#include "internal.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <ctype.h>
#include "ruby/util.h"
Go to the source code of this file.
Data Structures | |
struct | dir_data |
struct | chdir_data |
struct | glob_pattern |
struct | glob_args |
struct | brace_args |
Macros | |
#define | dirent direct |
#define | NAMLEN(dirent) (dirent)->d_namlen |
#define | lstat stat |
#define | rb_sys_fail_path(path) rb_sys_fail_str(path) |
#define | FNM_NOESCAPE 0x01 |
#define | FNM_PATHNAME 0x02 |
#define | FNM_DOTMATCH 0x04 |
#define | FNM_CASEFOLD 0x08 |
#define | FNM_EXTGLOB 0x10 |
#define | FNM_SYSCASE 0 |
#define | FNM_NOMATCH 1 |
#define | FNM_ERROR 2 |
#define | Next(p, e, enc) ((p)+ rb_enc_mbclen((p), (e), (enc))) |
#define | Inc(p, e, enc) ((p) = Next((p), (e), (enc))) |
#define | UNESCAPE(p) (escape && *(p) == '\\' ? (p) + 1 : (p)) |
#define | ISEND(p) (!*(p) || (pathname && *(p) == '/')) |
#define | RETURN(val) return *pcur = p, *scur = s, (val); |
#define | GlobPathValue(str, safe) |
#define | check_safe_glob(str, safe) ((safe) ? rb_check_safe_obj(str) : (void)0) |
#define | check_glob_encoding(str) rb_enc_check((str), rb_enc_from_encoding(rb_usascii_encoding())) |
#define | GetDIR(obj, dirp) ((dirp) = dir_check(obj)) |
#define | READDIR(dir, enc, entry, dp) (((dp) = readdir(dir)) != 0) |
#define | IF_HAVE_READDIR_R(something) /* nothing */ |
#define | DEFINE_STRUCT_DIRENT struct dirent |
#define | STRUCT_DIRENT(entry) (entry) |
#define | dir_tell rb_f_notimplement |
#define | dir_seek rb_f_notimplement |
#define | dir_set_pos rb_f_notimplement |
#define | dir_s_chroot rb_f_notimplement |
#define | GLOB_VERBOSE (1U << (sizeof(int) * CHAR_BIT - 1)) |
#define | sys_warning(val) (void)((flags & GLOB_VERBOSE) && rb_protect(sys_warning_1, (VALUE)(val), 0)) |
#define | GLOB_ALLOC(type) ((type *)malloc(sizeof(type))) |
#define | GLOB_ALLOC_N(type, n) ((type *)malloc(sizeof(type) * (n))) |
#define | GLOB_FREE(ptr) free(ptr) |
#define | GLOB_JUMP_TAG(status) (((status) == -1) ? rb_memerror() : rb_jump_tag(status)) |
#define | to_be_ignored(e) ((e) == ENOENT || (e) == ENOTDIR) |
#define | S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
#define | S_ISLNK(m) (0) |
#define | glob_call_func(func, path, arg, enc) (*(func))((path), (arg), (enc)) |
Enumerations | |
enum | glob_pattern_type { PLAIN, MAGICAL, RECURSIVE, MATCH_ALL, MATCH_DIR } |
enum | answer { UNKNOWN = -1, NO, YES } |
Variables | |
VALUE | rb_cDir |
static const rb_data_type_t | dir_data_type |
static int | chdir_blocking = 0 |
static VALUE | chdir_thread = Qnil |
#define check_glob_encoding | ( | str | ) | rb_enc_check((str), rb_enc_from_encoding(rb_usascii_encoding())) |
#define DEFINE_STRUCT_DIRENT struct dirent |
Definition at line 564 of file dir.c.
Referenced by dir_each(), dir_read(), and glob_helper().
#define dir_s_chroot rb_f_notimplement |
Definition at line 949 of file dir.c.
Referenced by Init_Dir().
#define dir_seek rb_f_notimplement |
Definition at line 689 of file dir.c.
Referenced by Init_Dir().
#define dir_set_pos rb_f_notimplement |
Definition at line 714 of file dir.c.
Referenced by Init_Dir().
#define dir_tell rb_f_notimplement |
Definition at line 660 of file dir.c.
Referenced by Init_Dir().
#define dirent direct |
Definition at line 32 of file dir.c.
Referenced by dir_each(), dir_read(), and glob_helper().
#define FNM_CASEFOLD 0x08 |
Definition at line 87 of file dir.c.
Referenced by bracket(), fnmatch_helper(), has_magic(), and Init_Dir().
#define FNM_DOTMATCH 0x04 |
Definition at line 86 of file dir.c.
Referenced by fnmatch(), fnmatch_helper(), glob_helper(), and Init_Dir().
#define FNM_EXTGLOB 0x10 |
Definition at line 88 of file dir.c.
Referenced by file_s_fnmatch(), and Init_Dir().
#define FNM_NOESCAPE 0x01 |
Definition at line 84 of file dir.c.
Referenced by bracket(), find_dirsep(), fnmatch_helper(), glob_helper(), has_magic(), Init_Dir(), and ruby_brace_expand().
#define FNM_NOMATCH 1 |
Definition at line 95 of file dir.c.
Referenced by fnmatch(), fnmatch_brace(), and fnmatch_helper().
#define FNM_PATHNAME 0x02 |
Definition at line 85 of file dir.c.
Referenced by fnmatch(), fnmatch_helper(), and Init_Dir().
#define FNM_SYSCASE 0 |
Definition at line 92 of file dir.c.
Referenced by has_magic(), Init_Dir(), rb_glob2(), and ruby_glob0().
Definition at line 477 of file dir.c.
Referenced by dir_close(), dir_each(), dir_read(), and dir_rewind().
Definition at line 1017 of file dir.c.
Referenced by glob_make_pattern().
Definition at line 1018 of file dir.c.
Referenced by glob_helper(), glob_make_pattern(), join_path(), ruby_brace_expand(), and ruby_glob0().
Definition at line 1300 of file dir.c.
Referenced by glob_helper().
Definition at line 1019 of file dir.c.
Referenced by glob_free_pattern(), glob_helper(), glob_make_pattern(), ruby_brace_expand(), and ruby_glob0().
#define GLOB_JUMP_TAG | ( | status | ) | (((status) == -1) ? rb_memerror() : rb_jump_tag(status)) |
Definition at line 1020 of file dir.c.
Referenced by dir_globs(), rb_glob(), and rb_push_glob().
#define GLOB_VERBOSE (1U << (sizeof(int) * CHAR_BIT - 1)) |
Definition at line 1013 of file dir.c.
Referenced by push_glob(), rb_glob2(), ruby_brace_glob(), ruby_brace_glob_with_enc(), and ruby_glob().
Definition at line 359 of file dir.c.
Referenced by dir_globs(), dir_initialize(), and rb_push_glob().
#define IF_HAVE_READDIR_R | ( | something | ) | /* nothing */ |
Definition at line 532 of file dir.c.
Referenced by dir_each(), dir_read(), and glob_helper().
Definition at line 99 of file dir.c.
Referenced by fnmatch(), fnmatch_helper(), remove_backslashes(), and ruby_brace_expand().
Definition at line 176 of file dir.c.
Referenced by fnmatch_helper().
#define lstat stat |
Definition at line 67 of file dir.c.
Referenced by do_lstat(), rb_file_expand_path_internal(), rb_file_lstat(), rb_file_s_ftype(), rb_file_s_lstat(), rb_file_symlink_p(), and realpath_rec().
Definition at line 33 of file dir.c.
Referenced by dir_each(), dir_read(), and glob_helper().
Definition at line 98 of file dir.c.
Referenced by find_dirsep(), and has_magic().
#define rb_sys_fail_path | ( | path | ) | rb_sys_fail_str(path) |
Definition at line 82 of file dir.c.
Referenced by dir_chdir(), dir_initialize(), dir_s_mkdir(), and dir_s_rmdir().
Definition at line 527 of file dir.c.
Referenced by dir_each(), dir_read(), and glob_helper().
Definition at line 177 of file dir.c.
Referenced by fnmatch_helper(), get_event_id(), and symbol2event_flag().
Definition at line 1273 of file dir.c.
Referenced by glob_helper(), and load_file_internal().
#define S_ISLNK | ( | m | ) | (0) |
Definition at line 1278 of file dir.c.
Referenced by glob_helper(), rb_file_expand_path_internal(), rb_file_ftype(), rb_file_symlink_p(), rb_stat_l(), and realpath_rec().
#define STRUCT_DIRENT | ( | entry | ) | (entry) |
Definition at line 565 of file dir.c.
Referenced by dir_each(), dir_read(), and glob_helper().
#define sys_warning | ( | val | ) | (void)((flags & GLOB_VERBOSE) && rb_protect(sys_warning_1, (VALUE)(val), 0)) |
Definition at line 1014 of file dir.c.
Referenced by do_lstat(), do_opendir(), and do_stat().
Definition at line 1026 of file dir.c.
Referenced by do_lstat(), do_opendir(), and do_stat().
Definition at line 175 of file dir.c.
Referenced by fnmatch_helper().
enum glob_pattern_type |
|
static |
Definition at line 102 of file dir.c.
References FNM_CASEFOLD, FNM_NOESCAPE, memcmp(), NULL, p, r, rb_enc_codepoint, rb_enc_mbclen(), rb_enc_toupper(), s, and t1.
Referenced by fnmatch_helper().
|
static |
Definition at line 790 of file dir.c.
References dir_chdir(), chdir_data::done, chdir_data::old_path, and Qnil.
Referenced by dir_s_chdir().
|
static |
Definition at line 779 of file dir.c.
References dir_chdir(), chdir_data::done, chdir_data::new_path, Qnil, rb_thread_current(), rb_yield(), and TRUE.
Referenced by dir_s_chdir().
Definition at line 910 of file dir.c.
References d, enc, FilePathValue, len, path, rb_enc_get(), rb_enc_path_end(), rb_enc_path_skip_prefix(), rb_secure(), rb_str_encode_ospath(), rb_str_subseq(), and RSTRING_GETMEM.
Referenced by dir_s_mkdir(), and dir_s_rmdir().
Definition at line 764 of file dir.c.
References rb_sys_fail_path, and RSTRING_PTR.
Referenced by chdir_restore(), chdir_yield(), and dir_s_chdir().
Definition at line 466 of file dir.c.
References dir_data::dir, dir_closed(), dir_data_type, OBJ_UNTRUSTED, rb_check_frozen, rb_check_typeddata(), rb_eSecurityError, rb_raise(), and rb_safe_level.
Definition at line 752 of file dir.c.
References closedir, dir_data::dir, GetDIR, NULL, and Qnil.
Referenced by dir_entries(), dir_foreach(), dir_s_open(), and Init_Dir().
Definition at line 460 of file dir.c.
References rb_eIOError, and rb_raise().
Referenced by dir_check(), and dir_each().
Definition at line 619 of file dir.c.
References DEFINE_STRUCT_DIRENT, dir_data::dir, dir_closed(), dirent, dp, dir_data::enc, GetDIR, IF_HAVE_READDIR_R, NAMLEN, NULL, rb_external_str_new_with_enc(), rb_yield(), READDIR, RETURN_ENUMERATOR, rewinddir(), and STRUCT_DIRENT.
Referenced by dir_foreach(), and Init_Dir().
Definition at line 1917 of file dir.c.
References dir_close(), dir_open_dir(), rb_Array(), and rb_ensure().
Referenced by Init_Dir().
Definition at line 1895 of file dir.c.
References dir_close(), dir_each(), dir_open_dir(), Qnil, rb_ensure(), and RETURN_ENUMERATOR.
Referenced by Init_Dir().
Definition at line 1736 of file dir.c.
References argc, ary, GLOB_JUMP_TAG, GlobPathValue, i, push_glob(), rb_ary_new(), status, str, and TRUE.
Referenced by dir_s_aref(), and dir_s_glob().
Definition at line 388 of file dir.c.
References closedir, dir_data::dir, dir_data_type, dp, dir_data::enc, enc, errno, FALSE, GlobPathValue, ID2SYM, NIL_P(), NULL, opendir, dir_data::path, Qnil, rb_filesystem_encoding(), rb_gc(), rb_hash_aref(), rb_intern, rb_scan_args(), rb_str_dup_frozen, rb_str_encode_ospath(), rb_sys_fail_path, rb_to_encoding(), RSTRING_PTR, and TypedData_Get_Struct.
Referenced by dir_s_open(), and Init_Dir().
Definition at line 487 of file dir.c.
References CLASS_OF, dir_data_type, NIL_P(), dir_data::path, rb_class_name(), rb_funcall(), rb_intern, rb_str_append(), rb_str_cat2(), rb_str_new_cstr(), str, and TypedData_Get_Struct.
Referenced by Init_Dir().
Definition at line 330 of file dir.c.
References dir_data::dir, dir_data::path, ptr, and rb_gc_mark().
Definition at line 1865 of file dir.c.
References dir_data_type, rb_cDir, rb_check_typeddata(), rb_funcall2(), and rb_intern.
Referenced by dir_entries(), and dir_foreach().
Definition at line 513 of file dir.c.
References dir_data_type, NIL_P(), dir_data::path, Qnil, rb_str_dup(), and TypedData_Get_Struct.
Referenced by Init_Dir().
Definition at line 581 of file dir.c.
References DEFINE_STRUCT_DIRENT, dir_data::dir, dirent, dp, dir_data::enc, errno, GetDIR, IF_HAVE_READDIR_R, NAMLEN, Qnil, rb_external_str_new_with_enc(), rb_sys_fail(), READDIR, and STRUCT_DIRENT.
Referenced by Init_Dir().
Definition at line 729 of file dir.c.
References dir_data::dir, GetDIR, OBJ_UNTRUSTED, rb_eSecurityError, rb_raise(), rb_safe_level, and rewinddir().
Referenced by Init_Dir().
Definition at line 369 of file dir.c.
References dir_data::dir, dir_data_type, dir_data::enc, NULL, obj, dir_data::path, Qnil, and TypedData_Make_Struct.
Referenced by Init_Dir().
Definition at line 1761 of file dir.c.
References dir_globs(), and rb_push_glob().
Referenced by Init_Dir().
Definition at line 841 of file dir.c.
References chdir_restore(), chdir_yield(), dir_chdir(), chdir_data::done, FALSE, FilePathValue, getenv(), INT2FIX, chdir_data::new_path, chdir_data::old_path, path, Qnil, rb_block_given_p(), rb_dir_getwd(), rb_eArgError, rb_ensure(), rb_raise(), rb_scan_args(), rb_secure(), rb_str_encode_ospath(), rb_str_new2, rb_thread_current(), and rb_warn().
Referenced by Init_Dir().
Definition at line 1838 of file dir.c.
References ary, dir_globs(), flags, NIL_P(), NUM2INT, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_ary_each(), rb_block_given_p(), rb_check_array_type(), rb_push_glob(), rb_scan_args(), str, and v.
Referenced by Init_Dir().
Definition at line 2076 of file dir.c.
References NIL_P(), rb_home_dir(), rb_scan_args(), rb_str_new(), SafeStringValue, and StringValueCStr.
Referenced by Init_Dir().
Definition at line 968 of file dir.c.
References check_dirname(), INT2FIX, mode, NUM2INT, path, rb_scan_args(), rb_sys_fail_path, and RSTRING_PTR.
Referenced by Init_Dir().
Definition at line 446 of file dir.c.
References dir_data::dir, dir_close(), dir_data_type, dir_initialize(), dp, rb_block_given_p(), rb_ensure(), rb_yield(), and TypedData_Make_Struct.
Referenced by Init_Dir().
Definition at line 997 of file dir.c.
References check_dirname(), INT2FIX, rb_sys_fail_path, and RSTRING_PTR.
Referenced by Init_Dir().
Definition at line 1041 of file dir.c.
References errno, lstat, ret, sys_warning, and to_be_ignored.
Referenced by glob_helper().
|
static |
Definition at line 1051 of file dir.c.
References errno, NULL, opendir, rb_ascii8bit_encoding(), rb_enc_str_new(), rb_str_encode_ospath(), rb_usascii_encoding(), rb_utf8_encoding(), RSTRING_PTR, strlen(), sys_warning, tmp, and to_be_ignored.
Referenced by glob_helper().
Definition at line 1030 of file dir.c.
References errno, ret, stat, sys_warning, and to_be_ignored.
Referenced by glob_helper().
Definition at line 2033 of file dir.c.
References enc, FilePathStringValue, brace_args::flags, flags, FNM_EXTGLOB, fnmatch(), fnmatch_brace(), NUM2INT, path, Qfalse, Qtrue, rb_enc_compatible(), rb_enc_get(), RB_GC_GUARD, rb_scan_args(), RSTRING_PTR, ruby_brace_expand(), StringValue, and brace_args::value.
Referenced by Init_Dir().
|
static |
Definition at line 1105 of file dir.c.
References c, FNM_NOESCAPE, and Next.
Referenced by glob_make_pattern().
|
static |
Definition at line 272 of file dir.c.
References FNM_DOTMATCH, FNM_NOMATCH, FNM_PATHNAME, fnmatch_helper(), Inc, p, s, and strlen().
Referenced by file_s_fnmatch(), fnmatch_brace(), and glob_helper().
Definition at line 1926 of file dir.c.
References arg, enc, ENC_CODERANGE_7BIT, brace_args::flags, FNM_NOMATCH, fnmatch(), len, rb_enc_asciicompat, rb_enc_get(), rb_enc_str_asciionly_p(), rb_str_coderange_scan_restartable(), RSTRING_PTR, strlen(), and brace_args::value.
Referenced by file_s_fnmatch().
|
static |
Definition at line 180 of file dir.c.
References bracket(), FNM_CASEFOLD, FNM_DOTMATCH, FNM_NOESCAPE, FNM_NOMATCH, FNM_PATHNAME, Inc, ISEND, MBCLEN_CHARFOUND_P, memcmp(), p, r, rb_enc_codepoint, rb_enc_precise_mbclen(), rb_enc_toupper(), RETURN, s, strlen(), t, and UNESCAPE.
Referenced by fnmatch().
char* getenv | ( | ) |
Referenced by CONF_get1_default_config_file(), dir_s_chdir(), dln_find_1(), dln_find_exe_r(), env_assoc(), env_delete(), env_fetch(), env_has_key(), env_shift(), establishShell(), etc_getlogin(), get_param(), getaddrinfo(), main(), nl_langinfo_codeset(), process_options(), rb_env_path_tainted(), rb_f_getenv(), rb_gc_set_params(), rb_home_dir(), rb_w32_aspawn_flags(), rb_w32_spawn(), ruby_init_loadpath_safe(), and st_init_table_with_size().
Definition at line 1660 of file dir.c.
References arg, brace_args::flags, brace_args::func, ruby_glob0(), and brace_args::value.
Referenced by ruby_brace_glob0().
|
static |
Definition at line 1243 of file dir.c.
References GLOB_FREE, list, glob_pattern::next, glob_pattern::str, and tmp.
Referenced by glob_make_pattern(), and ruby_glob0().
Definition at line 1292 of file dir.c.
References args, glob_args::enc, glob_args::func, glob_args::path, Qnil, and glob_args::value.
Referenced by rb_glob_caller().
|
static |
Definition at line 1303 of file dir.c.
References buf, closedir, DEFINE_STRUCT_DIRENT, dirent, do_lstat(), do_opendir(), do_stat(), dp, end, FNM_DOTMATCH, FNM_NOESCAPE, fnmatch(), for(), GLOB_ALLOC_N, glob_call_func, GLOB_FREE, IF_HAVE_READDIR_R, join_path(), len, MAGICAL, MATCH_ALL, MATCH_DIR, memcpy(), name, NAMLEN, glob_pattern::next, NO, NULL, p, PLAIN, rb_bug(), READDIR, RECURSIVE, remove_backslashes(), S_ISDIR, S_ISLNK, stat, status, glob_pattern::str, strlen(), STRUCT_DIRENT, tmp, glob_pattern::type, UNKNOWN, and YES.
Referenced by ruby_glob0().
|
static |
Definition at line 1176 of file dir.c.
References buf, find_dirsep(), GLOB_ALLOC, GLOB_ALLOC_N, GLOB_FREE, glob_free_pattern(), has_magic(), list, m, MAGICAL, MATCH_ALL, MATCH_DIR, memcpy(), glob_pattern::next, p, PLAIN, RECURSIVE, glob_pattern::str, tail, tmp, and glob_pattern::type.
Referenced by ruby_glob0().
|
static |
Definition at line 1073 of file dir.c.
References c, FNM_CASEFOLD, FNM_NOESCAPE, FNM_SYSCASE, ISALPHA, and Next.
Referenced by glob_make_pattern().
Definition at line 2117 of file dir.c.
References dir_close(), dir_each(), dir_entries(), dir_foreach(), dir_initialize(), dir_inspect(), dir_path(), dir_read(), dir_rewind(), dir_s_alloc(), dir_s_aref(), dir_s_chdir(), dir_s_chroot, dir_s_getwd(), dir_s_glob(), dir_s_home(), dir_s_mkdir(), dir_s_open(), dir_s_rmdir(), dir_seek, dir_set_pos, dir_tell, file_s_fnmatch(), FNM_CASEFOLD, FNM_DOTMATCH, FNM_EXTGLOB, FNM_NOESCAPE, FNM_PATHNAME, FNM_SYSCASE, INT2FIX, rb_cDir, rb_cFile, rb_cObject, rb_define_alloc_func(), rb_define_class(), rb_define_method(), rb_define_singleton_method(), rb_file_const(), rb_file_directory_p(), rb_include_module(), and rb_mEnumerable.
Definition at line 1255 of file dir.c.
References buf, GLOB_ALLOC_N, len, memcpy(), and strlen().
Referenced by glob_helper().
Definition at line 1693 of file dir.c.
References ary, glob_args::enc, enc, glob_args::func, GLOB_VERBOSE, push_pattern(), rb_enc_get(), rb_filesystem_encoding(), RB_GC_GUARD, rb_glob_caller(), rb_usascii_encoding(), RSTRING_PTR, ruby_brace_glob0(), and glob_args::value.
Referenced by dir_globs(), and rb_push_glob().
Definition at line 1589 of file dir.c.
References rb_ary_push(), rb_external_str_new_with_enc(), and strlen().
Referenced by push_glob().
Definition at line 878 of file dir.c.
References my_getcwd, path, rb_enc_associate(), rb_filesystem_encoding(), rb_secure(), rb_tainted_str_new2, and xfree.
Referenced by dir_s_chdir(), dir_s_getwd(), and rb_realpath_internal().
Definition at line 1582 of file dir.c.
References func, GLOB_JUMP_TAG, rb_ascii8bit_encoding(), rb_glob2(), and status.
|
static |
Definition at line 1563 of file dir.c.
References arg, glob_args::enc, enc, FNM_SYSCASE, func, glob_args::func, GLOB_VERBOSE, rb_glob_caller(), rb_warning(), ruby_glob0(), and glob_args::value.
Referenced by rb_glob().
Definition at line 1552 of file dir.c.
References args, glob_func_caller(), glob_args::path, path, rb_protect(), and status.
Referenced by push_glob(), and rb_glob2().
Definition at line 1709 of file dir.c.
References ary, GLOB_JUMP_TAG, GlobPathValue, p, push_glob(), rb_ary_new(), rb_enc_get(), rb_enc_str_new(), RSTRING_LEN, RSTRING_PTR, status, strlen(), and TRUE.
Referenced by dir_s_aref(), and dir_s_glob().
|
static |
|
static |
int ruby_brace_glob | ( | const char * | str, |
int | flags, | ||
ruby_glob_func * | func, | ||
VALUE | arg | ||
) |
Definition at line 1680 of file dir.c.
References GLOB_VERBOSE, rb_ascii8bit_encoding(), and ruby_brace_glob0().
Referenced by cmdglob().
|
static |
Definition at line 1668 of file dir.c.
References arg, brace_args::flags, flags, func, brace_args::func, glob_brace(), ruby_brace_expand(), and brace_args::value.
Referenced by push_glob(), ruby_brace_glob(), and ruby_brace_glob_with_enc().
int ruby_brace_glob_with_enc | ( | const char * | str, |
int | flags, | ||
ruby_glob_func * | func, | ||
VALUE | arg, | ||
rb_encoding * | enc | ||
) |
Definition at line 1687 of file dir.c.
References GLOB_VERBOSE, and ruby_brace_glob0().
int ruby_glob | ( | const char * | path, |
int | flags, | ||
ruby_glob_func * | func, | ||
VALUE | arg | ||
) |
Definition at line 1545 of file dir.c.
References GLOB_VERBOSE, rb_ascii8bit_encoding(), and ruby_glob0().
|
static |
Definition at line 1510 of file dir.c.
References buf, FNM_SYSCASE, GLOB_ALLOC_N, GLOB_FREE, glob_free_pattern(), glob_helper(), glob_make_pattern(), list, MEMCPY, n, path, rb_enc_path_skip_prefix(), status, strlen(), and UNKNOWN.
Referenced by glob_brace(), rb_glob2(), and ruby_glob().
char* strchr | ( | char * | , |
char | |||
) |
Referenced by check_exec_env_i(), date__strptime_internal(), date_strftime_with_tmx(), date_zone_to_diff(), dln_find_1(), env_each_pair(), env_has_value(), env_inspect(), env_key(), env_keys(), env_rassoc(), env_shift(), env_to_a(), env_to_hash(), env_values(), getnameinfo(), io_encname_bom_p(), nl_langinfo_codeset(), num_pattern_p(), pack_pack(), pack_unpack(), parse_ddd_cb(), process_sflag(), rb_env_size(), rb_exec_fillarg(), rb_f_test(), rb_feature_provided(), rb_file_open_internal(), rb_io_extract_modeenc(), rb_num2long(), rb_num2ulong(), rb_path_check(), rb_strftime_with_timespec(), rb_w32_aspawn_flags(), rb_w32_pipe(), rb_w32_spawn(), ruby_scan_hex(), ruby_setenv(), ruby_strtod(), search_required(), and str2num().
Definition at line 1007 of file dir.c.
References errno, Qnil, rb_sys_warning(), and strerror().
|
static |
Definition at line 352 of file dir.c.
Referenced by dir_check(), dir_initialize(), dir_inspect(), dir_open_dir(), dir_path(), dir_s_alloc(), and dir_s_open().
VALUE rb_cDir |
Definition at line 321 of file dir.c.
Referenced by dir_open_dir(), Init_Dir(), path_each_entry(), path_entries(), path_mkdir(), path_opendir(), path_rmdir(), path_s_getwd(), path_s_glob(), and unlink_body().