|
Ruby
2.5.0dev(2017-10-22revision60238)
|
#include "ruby/ruby.h"#include "ruby/encoding.h"#include "internal.h"#include <winbase.h>#include <wchar.h>#include <shlwapi.h>#include "win32/file.h"Go to the source code of this file.
Data Structures | |
| struct | code_page_table |
Macros | |
| #define | INVALID_FILE_ATTRIBUTES ((DWORD)-1) |
| #define | IS_DIR_SEPARATOR_P(c) (c == L'\\' || c == L'/') |
| #define | IS_DIR_UNC_P(c) (IS_DIR_SEPARATOR_P(c[0]) && IS_DIR_SEPARATOR_P(c[1])) |
| #define | INVALID_CODE_PAGE 51932 |
| #define | PATH_BUFFER_SIZE MAX_PATH * 2 |
| #define | insecure_obj_p(obj, level) ((level) > 0 && OBJ_TAINTED(obj)) |
| #define | system_code_page rb_w32_filecp |
| #define | mbstr_to_wstr rb_w32_mbstr_to_wstr |
| #define | wstr_to_mbstr rb_w32_wstr_to_mbstr |
| #define | fix_string_encoding(str, encoding) rb_str_conv_enc((str), (encoding), rb_utf8_encoding()) |
Functions | |
| void | rb_enc_foreach_name (int(*func)(st_data_t name, st_data_t idx, st_data_t arg), st_data_t arg) |
| VALUE | rb_default_home_dir (VALUE result) |
| VALUE | rb_file_expand_path_internal (VALUE fname, VALUE dname, int abs_mode, int long_name, VALUE result) |
| VALUE | rb_readlink (VALUE path, rb_encoding *resultenc) |
| int | rb_file_load_ok (const char *path) |
| int | rb_freopen (VALUE fname, const char *mode, FILE *file) |
| void | Init_w32_codepage (void) |
| #define fix_string_encoding | ( | str, | |
| encoding | |||
| ) | rb_str_conv_enc((str), (encoding), rb_utf8_encoding()) |
| #define insecure_obj_p | ( | obj, | |
| level | |||
| ) | ((level) > 0 && OBJ_TAINTED(obj)) |
| #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) |
Definition at line 14 of file file.c.
Referenced by rb_file_load_ok().
| #define IS_DIR_UNC_P | ( | c | ) | (IS_DIR_SEPARATOR_P(c[0]) && IS_DIR_SEPARATOR_P(c[1])) |
| #define mbstr_to_wstr rb_w32_mbstr_to_wstr |
Definition at line 34 of file file.c.
Referenced by rb_file_load_ok().
| #define system_code_page rb_w32_filecp |
| #define wstr_to_mbstr rb_w32_wstr_to_mbstr |
| void Init_w32_codepage | ( | void | ) |
Definition at line 703 of file file.c.
Referenced by rb_locale_encindex().
| void rb_enc_foreach_name | ( | int(*)(st_data_t name, st_data_t idx, st_data_t arg) | func, |
| st_data_t | arg | ||
| ) |
Definition at line 1964 of file encoding.c.
References st_foreach.
| VALUE rb_file_expand_path_internal | ( | VALUE | fname, |
| VALUE | dname, | ||
| int | abs_mode, | ||
| int | long_name, | ||
| VALUE | result | ||
| ) |
Definition at line 253 of file file.c.
References buf, BUFCHECK, BUFINIT, ENC_CODERANGE_CLEAR, isdirsep, nextdirsep, NIL_P, OBJ_TAINTED, PRIsVALUE, Qnil, rb_default_home_dir(), rb_eArgError, rb_enc_associate(), rb_enc_copy(), rb_enc_get(), rb_enc_raise(), rb_file_expand_path_internal(), rb_filesystem_encoding(), rb_home_dir_of(), rb_is_absolute_path(), rb_raise(), rb_str_set_len(), RSTRING_LEN, RSTRING_PTR, StringValuePtr, and TOLOWER.
| int rb_file_load_ok | ( | const char * | path | ) |
Definition at line 643 of file file.c.
References free(), INVALID_FILE_ATTRIBUTES, len, mbstr_to_wstr, NULL, O_NONBLOCK, rb_cloexec_open(), rb_update_max_fd(), and ruby_is_fd_loadable().
Definition at line 674 of file file.c.
References ALLOCV_END, ALLOCV_N, errno, len, name, NULL, numberof, RB_GC_GUARD, rb_long2int, and RSTRING_GETMEM.
| VALUE rb_readlink | ( | VALUE | path, |
| rb_encoding * | resultenc | ||
| ) |
Definition at line 599 of file file.c.
References FilePathValue, len, and rb_enc_get().
1.8.13