Rizin
unix-like reverse engineering framework and cli tools
|
#include <assert.h>
#include <stdlib.h>
#include <direct.h>
#include <errno.h>
#include <fcntl.h>
#include <io.h>
#include <limits.h>
#include <sys/stat.h>
#include <sys/utime.h>
#include <stdio.h>
#include "uv.h"
#include "internal.h"
#include "req-inl.h"
#include "handle-inl.h"
#include "fs-fd-hash-inl.h"
Go to the source code of this file.
Macros | |
#define | UV_FS_FREE_PATHS 0x0002 |
#define | UV_FS_FREE_PTR 0x0008 |
#define | UV_FS_CLEANEDUP 0x0010 |
#define | INIT(subtype) |
#define | POST |
#define | SET_REQ_RESULT(req, result_value) |
#define | SET_REQ_WIN32_ERROR(req, sys_errno) |
#define | SET_REQ_UV_ERROR(req, uv_errno, sys_errno) |
#define | VERIFY_FD(fd, req) |
#define | MILLIONu (1000U * 1000U) |
#define | BILLIONu (1000U * 1000U * 1000U) |
#define | FILETIME_TO_UINT(filetime) (*((uint64_t*) &(filetime)) - (uint64_t) 116444736 * BILLIONu) |
#define | FILETIME_TO_TIME_T(filetime) (FILETIME_TO_UINT(filetime) / (10u * MILLIONu)) |
#define | FILETIME_TO_TIME_NS(filetime, secs) ((FILETIME_TO_UINT(filetime) - (secs * (uint64_t) 10 * MILLIONu)) * 100U) |
#define | FILETIME_TO_TIMESPEC(ts, filetime) |
#define | TIME_T_TO_FILETIME(time, filetime_ptr) |
#define | IS_SLASH(c) ((c) == L'\\' || (c) == L'/') |
#define | IS_LETTER(c) |
#define | MIN(a, b) (((a) < (b)) ? (a) : (b)) |
#define | XX(uc, lc) case UV_FS_##uc: fs__##lc(req); break; |
Typedefs | |
typedef int(* | uv__fs_mktemp_func) (uv_fs_t *req) |
Variables | |
const WCHAR | JUNCTION_PREFIX [] = L"\\??\\" |
const WCHAR | JUNCTION_PREFIX_LEN = 4 |
const WCHAR | LONG_PATH_PREFIX [] = L"\\\\?\\" |
const WCHAR | LONG_PATH_PREFIX_LEN = 4 |
const WCHAR | UNC_PATH_PREFIX [] = L"\\\\?\\UNC\\" |
const WCHAR | UNC_PATH_PREFIX_LEN = 8 |
static int | uv__file_symlink_usermode_flag = SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE |
static DWORD | uv__allocation_granularity |
#define FILETIME_TO_TIME_NS | ( | filetime, | |
secs | |||
) | ((FILETIME_TO_UINT(filetime) - (secs * (uint64_t) 10 * MILLIONu)) * 100U) |
#define FILETIME_TO_TIME_T | ( | filetime | ) | (FILETIME_TO_UINT(filetime) / (10u * MILLIONu)) |
#define FILETIME_TO_TIMESPEC | ( | ts, | |
filetime | |||
) |
#define INIT | ( | subtype | ) |
#define IS_LETTER | ( | c | ) |
#define POST |
#define SET_REQ_RESULT | ( | req, | |
result_value | |||
) |
#define SET_REQ_UV_ERROR | ( | req, | |
uv_errno, | |||
sys_errno | |||
) |
#define SET_REQ_WIN32_ERROR | ( | req, | |
sys_errno | |||
) |
#define TIME_T_TO_FILETIME | ( | time, | |
filetime_ptr | |||
) |
#define XX | ( | uc, | |
lc | |||
) | case UV_FS_##uc: fs__##lc(req); break; |
|
static |
Definition at line 2137 of file fs.c.
References DWORD, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, and W_OK.
|
static |
Definition at line 151 of file fs.c.
References assert(), DWORD, memcpy(), NULL, path, pos, r, req, uv__malloc(), and UV_FS_FREE_PATHS.
Referenced by uv_fs_access(), uv_fs_chmod(), uv_fs_chown(), uv_fs_copyfile(), uv_fs_lchown(), uv_fs_link(), uv_fs_lstat(), uv_fs_lutime(), uv_fs_mkdir(), uv_fs_mkdtemp(), uv_fs_mkstemp(), uv_fs_open(), uv_fs_opendir(), uv_fs_readlink(), uv_fs_realpath(), uv_fs_rename(), uv_fs_rmdir(), uv_fs_scandir(), uv_fs_stat(), uv_fs_statfs(), uv_fs_symlink(), uv_fs_unlink(), and uv_fs_utime().
|
static |
|
static |
Definition at line 2683 of file fs.c.
References req, and SET_REQ_RESULT.
void fs__close | ( | uv_fs_t * | req | ) |
Definition at line 705 of file fs.c.
References assert(), EBADF, fd, INVALID_HANDLE_VALUE, uv__fd_info_s::mapping, req, SET_REQ_RESULT, SET_REQ_UV_ERROR, uv__fd_hash_remove(), and VERIFY_FD.
void fs__closedir | ( | uv_fs_t * | req | ) |
|
static |
Definition at line 2053 of file fs.c.
References flags, fs__stat_impl_from_path(), req, SET_REQ_RESULT, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, uv_stat_t::st_dev, uv_stat_t::st_ino, UV_FS_COPYFILE_EXCL, and UV_FS_COPYFILE_FICLONE_FORCE.
|
static |
Definition at line 2368 of file fs.c.
References bytes, DWORD, error(), FSCTL_SET_REPARSE_POINT, handle, HANDLE, i, INVALID_HANDLE_VALUE, IS_LETTER, IS_SLASH, JUNCTION_PREFIX, JUNCTION_PREFIX_LEN, L, len, LONG_PATH_PREFIX, LONG_PATH_PREFIX_LEN, NULL, path, req, SET_REQ_RESULT, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, start, uv__free(), uv__malloc(), and uv_fatal_error().
Referenced by fs__symlink().
|
static |
Definition at line 2172 of file fs.c.
References fd, _FILE_BASIC_INFORMATION::FileAttributes, FileBasicInformation, handle, HANDLE, INVALID_HANDLE_VALUE, NT_SUCCESS, pNtQueryInformationFile, pNtSetInformationFile, pRtlNtStatusToDosError, req, SET_REQ_SUCCESS, SET_REQ_WIN32_ERROR, uv__get_osfhandle(), and VERIFY_FD.
|
static |
Definition at line 2688 of file fs.c.
References req, and SET_REQ_RESULT.
|
static |
Definition at line 735 of file fs.c.
References assert(), EXCEPTION_IN_PAGE_ERROR, LONG, NULL, pRtlNtStatusToDosError, and status.
Referenced by fs__read_filemap(), and fs__write_filemap().
|
static |
Definition at line 1919 of file fs.c.
References fd, fs__stat_handle(), handle, HANDLE, INVALID_HANDLE_VALUE, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, uv__get_osfhandle(), and VERIFY_FD.
|
static |
Definition at line 1967 of file fs.c.
References fs__sync_impl(), and req.
|
static |
Definition at line 1977 of file fs.c.
References uv__fd_info_s::current_pos, DWORD, _FILE_END_OF_FILE_INFORMATION::EndOfFile, fd, FileEndOfFileInformation, uv__fd_info_s::flags, handle, HANDLE, INVALID_HANDLE_VALUE, uv__fd_info_s::is_directory, uv__fd_info_s::mapping, NT_SUCCESS, NULL, pNtSetInformationFile, pRtlNtStatusToDosError, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, uv__fd_info_s::size, status, uv__fd_hash_add(), uv__fd_hash_get(), uv__get_osfhandle(), UV_FS_O_RDONLY, UV_FS_O_RDWR, UV_FS_O_WRONLY, and VERIFY_FD.
|
static |
Definition at line 2334 of file fs.c.
References fd, fs__utime_handle(), handle, HANDLE, INVALID_HANDLE_VALUE, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, uv__get_osfhandle(), and VERIFY_FD.
|
static |
Definition at line 2693 of file fs.c.
References req, and SET_REQ_RESULT.
|
static |
Definition at line 2359 of file fs.c.
References DWORD, NULL, r, req, SET_REQ_RESULT, and SET_REQ_WIN32_ERROR.
|
static |
|
static |
void fs__mkdir | ( | uv_fs_t * | req | ) |
Definition at line 1221 of file fs.c.
References NULL, req, SET_REQ_RESULT, and SET_REQ_WIN32_ERROR.
void fs__mkdtemp | ( | uv_fs_t * | req | ) |
Definition at line 1283 of file fs.c.
References DWORD, error(), NULL, req, SET_REQ_RESULT, and SET_REQ_WIN32_ERROR.
Referenced by fs__mkdtemp().
void fs__mkstemp | ( | uv_fs_t * | req | ) |
Definition at line 1304 of file fs.c.
References DWORD, EMFILE, error(), fd, file, HANDLE, INVALID_HANDLE_VALUE, NULL, req, SET_REQ_RESULT, SET_REQ_UV_ERROR, and SET_REQ_WIN32_ERROR.
Referenced by fs__mkstemp().
void fs__mktemp | ( | uv_fs_t * | req, |
uv__fs_mktemp_func | func | ||
) |
Definition at line 1235 of file fs.c.
References i, L, len, path, req, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, uv__random_rtlgenrandom(), and v.
Referenced by fs__mkdtemp(), and fs__mkstemp().
void fs__open | ( | uv_fs_t * | req | ) |
Definition at line 450 of file fs.c.
References access, uv__fd_info_s::current_pos, DWORD, EMFILE, error(), fd, file, flags, uv__fd_info_s::flags, HANDLE, INVALID_HANDLE_VALUE, uv__fd_info_s::is_directory, uv__fd_info_s::mapping, NULL, req, SET_REQ_RESULT, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, uv__fd_info_s::size, umask, uv__fd_hash_add(), UV_FS_O_APPEND, UV_FS_O_CREAT, UV_FS_O_DIRECT, UV_FS_O_DSYNC, UV_FS_O_EXCL, UV_FS_O_EXLOCK, UV_FS_O_FILEMAP, UV_FS_O_RANDOM, UV_FS_O_RDONLY, UV_FS_O_RDWR, UV_FS_O_SEQUENTIAL, UV_FS_O_SHORT_LIVED, UV_FS_O_SYNC, UV_FS_O_TEMPORARY, UV_FS_O_TRUNC, and UV_FS_O_WRONLY.
void fs__opendir | ( | uv_fs_t * | req | ) |
Definition at line 1569 of file fs.c.
References error(), FALSE, find_path(), INVALID_HANDLE_VALUE, IS_SLASH, L, len, NULL, req, SET_REQ_RESULT, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, uv__free(), and uv__malloc().
void fs__read | ( | uv_fs_t * | req | ) |
Definition at line 852 of file fs.c.
References bytes, DWORD, error(), fd, fs__read_filemap(), handle, HANDLE, INVALID_HANDLE_VALUE, memset(), NULL, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, uv__fd_hash_get(), uv__get_osfhandle(), and VERIFY_FD.
void fs__read_filemap | ( | uv_fs_t * | req, |
struct uv__fd_info_s * | fd_info | ||
) |
Definition at line 755 of file fs.c.
References assert(), uv__fd_info_s::current_pos, err, fd, uv__fd_info_s::flags, fs__filemap_ex_filter(), uv__fd_info_s::is_directory, uv__fd_info_s::mapping, memcpy(), MIN, NULL, pos, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, uv__fd_info_s::size, uv__allocation_granularity, uv__fd_hash_add(), UV_FS_O_RDONLY, UV_FS_O_RDWR, and UV_FS_O_WRONLY.
Referenced by fs__read().
void fs__readdir | ( | uv_fs_t * | req | ) |
Definition at line 1628 of file fs.c.
References uv_dir_s::dirents, error(), i, L, memset(), uv_dirent_s::name, uv_dir_s::nentries, NULL, r, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, TRUE, uv_dirent_s::type, uv__convert_utf16_to_utf8(), UV__DT_CHAR, UV__DT_DIR, UV__DT_FILE, UV__DT_LINK, uv__free(), uv__fs_get_dirent_type(), and UV_FS_FREE_PTR.
|
static |
Definition at line 2579 of file fs.c.
References fs__readlink_handle(), handle, HANDLE, INVALID_HANDLE_VALUE, NULL, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, and UV_FS_FREE_PTR.
|
static |
Definition at line 315 of file fs.c.
References bytes, DWORD, ERROR_SYMLINK_NOT_SUPPORTED, fs__wide_to_utf8(), FSCTL_GET_REPARSE_POINT, handle, i, IO_REPARSE_TAG_APPEXECLINK, IO_REPARSE_TAG_SYMLINK, L, len, and NULL.
Referenced by fs__readlink(), fs__stat_handle(), and fs__unlink().
|
static |
Definition at line 2656 of file fs.c.
References fs__realpath_handle(), handle, HANDLE, INVALID_HANDLE_VALUE, NULL, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, and UV_FS_FREE_PTR.
Definition at line 2608 of file fs.c.
References DWORD, fs__wide_to_utf8(), handle, L, LONG_PATH_PREFIX, LONG_PATH_PREFIX_LEN, NULL, r, UNC_PATH_PREFIX, UNC_PATH_PREFIX_LEN, uv__free(), and uv__malloc().
Referenced by fs__realpath().
|
static |
void fs__rmdir | ( | uv_fs_t * | req | ) |
void fs__scandir | ( | uv_fs_t * | req | ) |
Definition at line 1357 of file fs.c.
References __attribute__, __declspec(), cleanup(), dirent::d_name, FALSE, FileDirectoryInformation, HANDLE, info(), _IO_STATUS_BLOCK::Information, INVALID_HANDLE_VALUE, L, NT_SUCCESS, NULL, pNtQueryDirectoryFile, pRtlNtStatusToDosError, req, SET_REQ_RESULT, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, STATIC_ASSERT, status, STATUS_BUFFER_OVERFLOW, STATUS_INVALID_PARAMETER, STATUS_NO_MORE_FILES, STATUS_SUCCESS, TRUE, UV__DT_CHAR, UV__DT_DIR, UV__DT_FILE, UV__DT_LINK, uv__free(), uv__malloc(), uv__realloc(), and UV_FS_FREE_PTR.
|
static |
Definition at line 2090 of file fs.c.
References buf_size, length, n, req, SEEK_SET, SET_REQ_RESULT, uv__free(), uv__malloc(), and uv_fatal_error().
|
static |
Definition at line 1907 of file fs.c.
References fs__stat_impl(), fs__stat_prepare_path(), and req.
Definition at line 1701 of file fs.c.
References _FILE_STANDARD_INFORMATION::AllocationSize, _FILE_ALL_INFORMATION::BasicInformation, _FILE_BASIC_INFORMATION::ChangeTime, _FILE_BASIC_INFORMATION::CreationTime, _FILE_STANDARD_INFORMATION::EndOfFile, FileAllInformation, _FILE_BASIC_INFORMATION::FileAttributes, FileFsVolumeInformation, FILETIME_TO_TIMESPEC, fs__readlink_handle(), handle, _FILE_INTERNAL_INFORMATION::IndexNumber, _FILE_ALL_INFORMATION::InternalInformation, _FILE_BASIC_INFORMATION::LastAccessTime, _FILE_BASIC_INFORMATION::LastWriteTime, NT_ERROR, NULL, _FILE_STANDARD_INFORMATION::NumberOfLinks, pNtQueryInformationFile, pNtQueryVolumeInformationFile, pRtlNtStatusToDosError, S_IFLNK, uv_stat_t::st_atim, uv_stat_t::st_birthtim, uv_stat_t::st_blksize, uv_stat_t::st_blocks, uv_stat_t::st_ctim, uv_stat_t::st_dev, uv_stat_t::st_flags, uv_stat_t::st_gen, uv_stat_t::st_gid, uv_stat_t::st_ino, uv_stat_t::st_mode, uv_stat_t::st_mtim, uv_stat_t::st_nlink, uv_stat_t::st_rdev, uv_stat_t::st_size, uv_stat_t::st_uid, _FILE_ALL_INFORMATION::StandardInformation, _IO_STATUS_BLOCK::Status, STATUS_NOT_IMPLEMENTED, and _FILE_FS_VOLUME_INFORMATION::VolumeSerialNumber.
Referenced by fs__fstat(), and fs__stat_impl_from_path().
Definition at line 1884 of file fs.c.
References DWORD, error(), ERROR_SYMLINK_NOT_SUPPORTED, fs__stat_impl_from_path(), req, SET_REQ_RESULT, and SET_REQ_WIN32_ERROR.
Referenced by fs__lstat(), and fs__stat().
|
static |
Definition at line 1853 of file fs.c.
References DWORD, flags, fs__stat_handle(), handle, HANDLE, INVALID_HANDLE_VALUE, NULL, and path.
Referenced by fs__copyfile(), and fs__stat_impl().
|
static |
|
static |
Definition at line 2698 of file fs.c.
References DWORD, err, uv_statfs_s::f_bavail, uv_statfs_s::f_bfree, uv_statfs_s::f_blocks, uv_statfs_s::f_bsize, uv_statfs_s::f_ffree, uv_statfs_s::f_files, uv_statfs_s::f_type, L, len, NULL, req, SET_REQ_RESULT, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, uv__free(), uv__malloc(), uv__reallocf(), and UV_FS_FREE_PTR.
|
static |
Definition at line 2538 of file fs.c.
References err, flags, fs__create_junction(), req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, SYMBOLIC_LINK_FLAG_DIRECTORY, uv__file_symlink_usermode_flag, UV_FS_SYMLINK_DIR, and UV_FS_SYMLINK_JUNCTION.
Definition at line 1952 of file fs.c.
References fd, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, uv__get_osfhandle(), and VERIFY_FD.
Referenced by fs__fdatasync(), and fs__fsync().
void fs__unlink | ( | uv_fs_t * | req | ) |
Definition at line 1134 of file fs.c.
References _FILE_DISPOSITION_INFORMATION::DeleteFile, DWORD, error(), ERROR_SYMLINK_NOT_SUPPORTED, FileBasicInformation, FileDispositionInformation, fs__readlink_handle(), handle, HANDLE, info(), INVALID_HANDLE_VALUE, NT_SUCCESS, NULL, pNtSetInformationFile, pRtlNtStatusToDosError, req, SET_REQ_SUCCESS, SET_REQ_WIN32_ERROR, status, and TRUE.
|
static |
Definition at line 2329 of file fs.c.
References fs__utime_impl(), and req.
Definition at line 2258 of file fs.c.
References handle, NULL, and TIME_T_TO_FILETIME.
Referenced by fs__futime(), and fs__utime_impl_from_path().
Definition at line 2304 of file fs.c.
References DWORD, error(), ERROR_SYMLINK_NOT_SUPPORTED, fs__utime_impl_from_path(), req, SET_REQ_RESULT, and SET_REQ_WIN32_ERROR.
Referenced by fs__lutime(), and fs__utime().
|
static |
Definition at line 2271 of file fs.c.
References DWORD, flags, fs__utime_handle(), handle, HANDLE, INVALID_HANDLE_VALUE, NULL, and path.
Referenced by fs__utime_impl().
|
static |
Definition at line 266 of file fs.c.
References assert(), NULL, r, and uv__malloc().
Referenced by fs__readlink_handle(), and fs__realpath_handle().
void fs__write | ( | uv_fs_t * | req | ) |
Definition at line 1054 of file fs.c.
References bytes, DWORD, fd, fs__write_filemap(), handle, HANDLE, INVALID_HANDLE_VALUE, memset(), NULL, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, uv__fd_hash_get(), uv__get_osfhandle(), and VERIFY_FD.
void fs__write_filemap | ( | uv_fs_t * | req, |
HANDLE | file, | ||
struct uv__fd_info_s * | fd_info | ||
) |
Definition at line 930 of file fs.c.
References assert(), uv__fd_info_s::current_pos, err, fd, uv__fd_info_s::flags, fs__filemap_ex_filter(), INVALID_HANDLE_VALUE, uv__fd_info_s::is_directory, uv__fd_info_s::mapping, memcpy(), NULL, pos, req, SET_REQ_RESULT, SET_REQ_WIN32_ERROR, uv__fd_info_s::size, uv__allocation_granularity, uv__fd_hash_add(), UV_FS_O_APPEND, UV_FS_O_RDONLY, UV_FS_O_RDWR, and UV_FS_O_WRONLY.
Referenced by fs__write().
Definition at line 2831 of file fs.c.
References assert(), container_of, req, SET_REQ_UV_ERROR, status, uv__req_unregister, and w.
|
static |
Definition at line 2781 of file fs.c.
References access, assert(), chmod, chown, close, container_of, fchmod, fdatasync, fstat, fsync, ftruncate, lchown, link, mkdir, mkdtemp(), read(), READ, readdir, readlink, rename, req, rmdir, scandir(), symlink, unlink, utime, w, write, and XX.
Definition at line 3323 of file fs.c.
References cb, err, flags, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_ACCESS.
Definition at line 3342 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_CHMOD.
int uv_fs_chown | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
uv_uid_t | uid, | ||
uv_gid_t | gid, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3174 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_CHOWN.
Definition at line 3094 of file fs.c.
References INIT, NULL, POST, req, SET_REQ_UV_ERROR, and UV_FS_CLOSEDIR.
int uv_fs_copyfile | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
const char * | new_path, | ||
int | flags, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3284 of file fs.c.
References cb, err, flags, fs__capture_path(), INIT, NULL, path, PATH2, POST, req, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, UV_FS_COPYFILE, UV_FS_COPYFILE_EXCL, UV_FS_COPYFILE_FICLONE, and UV_FS_COPYFILE_FICLONE_FORCE.
int uv_fs_fchown | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
uv_file | fd, | ||
uv_uid_t | uid, | ||
uv_gid_t | gid, | ||
uv_fs_cb | cb | ||
) |
void uv_fs_init | ( | void | ) |
Definition at line 141 of file fs.c.
References uv__allocation_granularity, and uv__fd_hash_init().
Referenced by uv_init().
int uv_fs_lchown | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
uv_uid_t | uid, | ||
uv_gid_t | gid, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3196 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_LCHOWN.
int uv_fs_link | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
const char * | new_path, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3107 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH2, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_LINK.
Definition at line 3225 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_LSTAT.
int uv_fs_lutime | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
double | atime, | ||
double | mtime, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3393 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_LUTIME.
Definition at line 2983 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_MKDIR.
Definition at line 2999 of file fs.c.
References err, fs__capture_path(), INIT, NULL, POST, req, SET_REQ_WIN32_ERROR, TRUE, uv__strdup(), and UV_FS_MKDTEMP.
Definition at line 3016 of file fs.c.
References err, fs__capture_path(), INIT, NULL, POST, req, SET_REQ_WIN32_ERROR, TRUE, uv__strdup(), and UV_FS_MKSTEMP.
int uv_fs_open | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
int | flags, | ||
int | mode, | ||
uv_fs_cb | cb | ||
) |
Definition at line 2878 of file fs.c.
References cb, err, flags, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_OPEN.
Referenced by main().
Definition at line 3062 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_OPENDIR.
int uv_fs_read | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
uv_file | fd, | ||
const uv_buf_t | bufs[], | ||
unsigned int | nbufs, | ||
int64_t | offset, | ||
uv_fs_cb | cb | ||
) |
Definition at line 2902 of file fs.c.
References ARRAY_SIZE, bufs, fd, file, INIT, memcpy(), NULL, off, POST, READ, req, SET_REQ_UV_ERROR, uv__malloc(), and UV_FS_READ.
Referenced by main(), on_open(), on_type(), and on_write().
Definition at line 3077 of file fs.c.
References uv_dir_s::dirents, INIT, INVALID_HANDLE_VALUE, NULL, POST, req, SET_REQ_UV_ERROR, and UV_FS_READDIR.
Definition at line 3138 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_READLINK.
Definition at line 3153 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_UV_ERROR, SET_REQ_WIN32_ERROR, and UV_FS_REALPATH.
int uv_fs_rename | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
const char * | new_path, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3246 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH2, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_RENAME.
void uv_fs_req_cleanup | ( | uv_fs_t * | req | ) |
Definition at line 2846 of file fs.c.
References NULL, req, uv__free(), uv__fs_readdir_cleanup(), uv__fs_scandir_cleanup(), UV_FS_CLEANEDUP, UV_FS_FREE_PATHS, UV_FS_FREE_PTR, UV_FS_MKDTEMP, UV_FS_MKSTEMP, UV_FS_OPENDIR, UV_FS_READDIR, and UV_FS_SCANDIR.
|
static |
Definition at line 250 of file fs.c.
References cb, loop, memset(), NULL, req, uv__once_init(), and UV_REQ_INIT.
Definition at line 3033 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_RMDIR.
Definition at line 3047 of file fs.c.
References cb, err, flags, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_SCANDIR.
int uv_fs_sendfile | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
uv_file | fd_out, | ||
uv_file | fd_in, | ||
int64_t | in_offset, | ||
size_t | length, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3211 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_STAT.
Referenced by timer_cb(), and uv_fs_poll_start().
Definition at line 3410 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_STATFS.
int uv_fs_symlink | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
const char * | new_path, | ||
int | flags, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3122 of file fs.c.
References cb, err, flags, fs__capture_path(), INIT, NULL, path, PATH2, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_SYMLINK.
Definition at line 2968 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_UNLINK.
Referenced by remove_sock().
int uv_fs_utime | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
const char * | path, | ||
double | atime, | ||
double | mtime, | ||
uv_fs_cb | cb | ||
) |
Definition at line 3367 of file fs.c.
References cb, err, fs__capture_path(), INIT, NULL, path, PATH, POST, req, SET_REQ_WIN32_ERROR, and UV_FS_UTIME.
int uv_fs_write | ( | uv_loop_t * | loop, |
uv_fs_t * | req, | ||
uv_file | fd, | ||
const uv_buf_t | bufs[], | ||
unsigned int | nbufs, | ||
int64_t | offset, | ||
uv_fs_cb | cb | ||
) |
Definition at line 2935 of file fs.c.
References ARRAY_SIZE, bufs, fd, file, INIT, memcpy(), NULL, off, POST, req, SET_REQ_UV_ERROR, uv__malloc(), and UV_FS_WRITE.
Referenced by on_read().
Definition at line 127 of file fs.c.
Referenced by fs__create_junction().
const WCHAR JUNCTION_PREFIX_LEN = 4 |
Definition at line 128 of file fs.c.
Referenced by fs__create_junction().
Definition at line 130 of file fs.c.
Referenced by fs__create_junction(), and fs__realpath_handle().
const WCHAR LONG_PATH_PREFIX_LEN = 4 |
Definition at line 131 of file fs.c.
Referenced by fs__create_junction(), and fs__realpath_handle().
Definition at line 133 of file fs.c.
Referenced by fs__realpath_handle().
const WCHAR UNC_PATH_PREFIX_LEN = 8 |
Definition at line 134 of file fs.c.
Referenced by fs__realpath_handle().
|
static |
Definition at line 138 of file fs.c.
Referenced by fs__read_filemap(), fs__write_filemap(), and uv_fs_init().
|
static |
Definition at line 136 of file fs.c.
Referenced by fs__symlink().