#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <io.h>
#include <stdio.h>
#include <stdlib.h>
#include "win32/winutil.h"
#include "win32/codepage.h"
Go to the source code of this file.
|
#define | PW32IO __declspec(dllimport) |
|
#define | PHP_WIN32_IOUTIL_MAXPATHLEN 2048 |
|
#define | MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN |
|
#define | W_OK 0x02 |
|
#define | R_OK 0x04 |
|
#define | X_OK 0x01 |
|
#define | F_OK 0x00 |
|
#define | SYMLINK_FLAG_RELATIVE 0x01 |
|
#define | PHP_WIN32_IOUTIL_FW_SLASHW L'/' |
|
#define | PHP_WIN32_IOUTIL_FW_SLASH '/' |
|
#define | PHP_WIN32_IOUTIL_BW_SLASHW L'\\' |
|
#define | PHP_WIN32_IOUTIL_BW_SLASH '\\' |
|
#define | PHP_WIN32_IOUTIL_DEFAULT_SLASHW PHP_WIN32_IOUTIL_BW_SLASHW |
|
#define | PHP_WIN32_IOUTIL_DEFAULT_SLASH PHP_WIN32_IOUTIL_BW_SLASH |
|
#define | PHP_WIN32_IOUTIL_DEFAULT_DIR_SEPARATORW L';' |
|
#define | PHP_WIN32_IOUTIL_IS_SLASHW(c) |
|
#define | PHP_WIN32_IOUTIL_IS_LETTERW(c) |
|
#define | PHP_WIN32_IOUTIL_JUNCTION_PREFIXW L"\\??\\" |
|
#define | PHP_WIN32_IOUTIL_JUNCTION_PREFIX_LENW 4 |
|
#define | PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW L"\\\\?\\" |
|
#define | PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW 4 |
|
#define | PHP_WIN32_IOUTIL_UNC_PATH_PREFIXW L"\\\\?\\UNC\\" |
|
#define | PHP_WIN32_IOUTIL_UNC_PATH_PREFIX_LENW 8 |
|
#define | PHP_WIN32_IOUTIL_IS_LONG_PATHW(pathw, path_lenw) |
|
#define | PHP_WIN32_IOUTIL_IS_UNC_PATHW(pathw, path_lenw) |
|
#define | PHP_WIN32_IOUTIL_IS_JUNCTION_PATHW(pathw, path_lenw) |
|
#define | PHP_WIN32_IOUTIL_IS_ABSOLUTEW(pathw, path_lenw) |
|
#define | PHP_WIN32_IOUTIL_IS_UNC(pathw, path_lenw) |
|
#define | PHP_WIN32_IOUTIL_DEFAULT_SHARE_MODE (FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE) |
|
#define | PHP_WIN32_IOUTIL_INIT_W(path) |
|
#define | PHP_WIN32_IOUTIL_CLEANUP_W() |
|
#define | PHP_WIN32_IOUTIL_REINIT_W(path) |
|
#define | PHP_WIN32_IOUTIL_PATH_IS_OK_W(pathw, len) |
|
#define | PHP_WIN32_IOUTIL_CHECK_PATH_W(pathw, ret, dealloc) |
|
#define | php_win32_ioutil_any_to_w(in) |
|
#define | php_win32_ioutil_ascii_to_w php_win32_cp_ascii_to_w |
|
#define | php_win32_ioutil_utf8_to_w php_win32_cp_utf8_to_w |
|
#define | php_win32_ioutil_cur_to_w php_win32_cp_cur_to_w |
|
#define | php_win32_ioutil_w_to_any php_win32_cp_w_to_any |
|
#define | php_win32_ioutil_conv_w_to_any php_win32_cp_conv_w_to_any |
|
#define | php_win32_ioutil_w_to_utf8 php_win32_cp_w_to_utf8 |
|
#define | php_win32_ioutil_w_to_thread php_win32_cp_w_to_thread |
|
#define | php_win32_ioutil_stat(path, buf) |
|
#define | php_win32_ioutil_lstat(path, buf) |
|
|
PW32IO php_win32_ioutil_normalization_result | php_win32_ioutil_normalize_path_w (wchar_t **buf, size_t len, size_t *new_len) |
|
PW32IO int | php_win32_ioutil_close (int fd) |
|
PW32IO BOOL | php_win32_ioutil_posix_to_open_opts (int flags, mode_t mode, php_ioutil_open_opts *opts) |
|
PW32IO size_t | php_win32_ioutil_dirname (char *buf, size_t len) |
|
PW32IO int | php_win32_ioutil_open_w (const wchar_t *path, int flags,...) |
|
PW32IO int | php_win32_ioutil_chdir_w (const wchar_t *path) |
|
PW32IO int | php_win32_ioutil_rename_w (const wchar_t *oldname, const wchar_t *newname) |
|
PW32IO wchar_t * | php_win32_ioutil_getcwd_w (wchar_t *buf, size_t len) |
|
PW32IO int | php_win32_ioutil_unlink_w (const wchar_t *path) |
|
PW32IO int | php_win32_ioutil_access_w (const wchar_t *path, mode_t mode) |
|
PW32IO int | php_win32_ioutil_mkdir_w (const wchar_t *path, mode_t mode) |
|
PW32IO FILE * | php_win32_ioutil_fopen_w (const wchar_t *path, const wchar_t *mode) |
|
PW32IO wchar_t * | php_win32_ioutil_realpath_w (const wchar_t *path, wchar_t *resolved) |
|
PW32IO wchar_t * | php_win32_ioutil_realpath_w_ex0 (const wchar_t *path, wchar_t *resolved, PBY_HANDLE_FILE_INFORMATION info) |
|
PW32IO int | php_win32_ioutil_symlink_w (const wchar_t *target, const wchar_t *link) |
|
PW32IO int | php_win32_ioutil_link_w (const wchar_t *target, const wchar_t *link) |
|
PW32IO char * | realpath (const char *path, char *resolved) |
|
PW32IO int | php_win32_ioutil_stat_ex_w (const wchar_t *path, size_t path_len, php_win32_ioutil_stat_t *buf, int lstat) |
|
PW32IO int | php_win32_ioutil_fstat (int fd, php_win32_ioutil_stat_t *buf) |
|
PW32IO ssize_t | php_win32_ioutil_readlink_w (const wchar_t *path, wchar_t *buf, size_t buf_len) |
|
◆ F_OK
◆ MAXPATHLEN
◆ php_win32_ioutil_any_to_w
#define php_win32_ioutil_any_to_w |
( |
| in | ) |
|
Value:
#define PHP_WIN32_CP_IGNORE_LEN_P
#define PHP_WIN32_CP_IGNORE_LEN
Definition at line 247 of file ioutil.h.
◆ php_win32_ioutil_ascii_to_w
◆ PHP_WIN32_IOUTIL_BW_SLASH
#define PHP_WIN32_IOUTIL_BW_SLASH '\\' |
◆ PHP_WIN32_IOUTIL_BW_SLASHW
#define PHP_WIN32_IOUTIL_BW_SLASHW L'\\' |
◆ PHP_WIN32_IOUTIL_CHECK_PATH_W
#define PHP_WIN32_IOUTIL_CHECK_PATH_W |
( |
| pathw, |
|
|
| ret, |
|
|
| dealloc ) |
Value: do { \
size_t _len = wcslen(pathw); \
if (dealloc) { \
free((void *)pathw); \
} \
SET_ERRNO_FROM_WIN32_CODE(ERROR_ACCESS_DENIED); \
} \
} while (0);
#define PHP_WIN32_IOUTIL_PATH_IS_OK_W(pathw, len)
Definition at line 160 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_CLEANUP_W
#define PHP_WIN32_IOUTIL_CLEANUP_W |
( |
| ) |
|
Value: do { \
free(pathw); \
} while (0);
Definition at line 146 of file ioutil.h.
◆ php_win32_ioutil_conv_w_to_any
#define php_win32_ioutil_conv_w_to_any php_win32_cp_conv_w_to_any |
◆ php_win32_ioutil_cur_to_w
◆ PHP_WIN32_IOUTIL_DEFAULT_DIR_SEPARATORW
#define PHP_WIN32_IOUTIL_DEFAULT_DIR_SEPARATORW L';' |
◆ PHP_WIN32_IOUTIL_DEFAULT_SHARE_MODE
#define PHP_WIN32_IOUTIL_DEFAULT_SHARE_MODE (FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE) |
◆ PHP_WIN32_IOUTIL_DEFAULT_SLASH
◆ PHP_WIN32_IOUTIL_DEFAULT_SLASHW
◆ PHP_WIN32_IOUTIL_FW_SLASH
#define PHP_WIN32_IOUTIL_FW_SLASH '/' |
◆ PHP_WIN32_IOUTIL_FW_SLASHW
#define PHP_WIN32_IOUTIL_FW_SLASHW L'/' |
◆ PHP_WIN32_IOUTIL_INIT_W
#define PHP_WIN32_IOUTIL_INIT_W |
( |
| path | ) |
|
Value:
#define php_win32_ioutil_any_to_w(in)
Definition at line 143 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_IS_ABSOLUTEW
#define PHP_WIN32_IOUTIL_IS_ABSOLUTEW |
( |
| pathw, |
|
|
| path_lenw ) |
Value:
#define PHP_WIN32_IOUTIL_IS_SLASHW(c)
#define PHP_WIN32_IOUTIL_IS_LETTERW(c)
#define PHP_WIN32_IOUTIL_IS_LONG_PATHW(pathw, path_lenw)
Definition at line 136 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_IS_JUNCTION_PATHW
#define PHP_WIN32_IOUTIL_IS_JUNCTION_PATHW |
( |
| pathw, |
|
|
| path_lenw ) |
Value:
#define PHP_WIN32_IOUTIL_JUNCTION_PREFIXW
#define PHP_WIN32_IOUTIL_JUNCTION_PREFIX_LENW
Definition at line 134 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_IS_LETTERW
#define PHP_WIN32_IOUTIL_IS_LETTERW |
( |
| c | ) |
|
Value:(((c) >= L'a' && (c) <= L'z') || ((c) >= L'A' && (c) <= L'Z'))
Definition at line 122 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_IS_LONG_PATHW
#define PHP_WIN32_IOUTIL_IS_LONG_PATHW |
( |
| pathw, |
|
|
| path_lenw ) |
Value:
#define PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW
#define PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW
Definition at line 130 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_IS_SLASHW
#define PHP_WIN32_IOUTIL_IS_SLASHW |
( |
| c | ) |
|
Value:
#define PHP_WIN32_IOUTIL_FW_SLASHW
#define PHP_WIN32_IOUTIL_BW_SLASHW
Definition at line 121 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_IS_UNC
#define PHP_WIN32_IOUTIL_IS_UNC |
( |
| pathw, |
|
|
| path_lenw ) |
Value:
#define PHP_WIN32_IOUTIL_UNC_PATH_PREFIXW
#define PHP_WIN32_IOUTIL_UNC_PATH_PREFIX_LENW
Definition at line 138 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_IS_UNC_PATHW
#define PHP_WIN32_IOUTIL_IS_UNC_PATHW |
( |
| pathw, |
|
|
| path_lenw ) |
◆ PHP_WIN32_IOUTIL_JUNCTION_PREFIX_LENW
#define PHP_WIN32_IOUTIL_JUNCTION_PREFIX_LENW 4 |
◆ PHP_WIN32_IOUTIL_JUNCTION_PREFIXW
#define PHP_WIN32_IOUTIL_JUNCTION_PREFIXW L"\\??\\" |
◆ PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW
#define PHP_WIN32_IOUTIL_LONG_PATH_PREFIX_LENW 4 |
◆ PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW
#define PHP_WIN32_IOUTIL_LONG_PATH_PREFIXW L"\\\\?\\" |
◆ php_win32_ioutil_lstat
Value:php_win32_ioutil_stat_ex(path,
buf, 1)
zend_ffi_ctype_name_buf buf
Definition at line 762 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_MAXPATHLEN
#define PHP_WIN32_IOUTIL_MAXPATHLEN 2048 |
◆ PHP_WIN32_IOUTIL_PATH_IS_OK_W
#define PHP_WIN32_IOUTIL_PATH_IS_OK_W |
( |
| pathw, |
|
|
| len ) |
Value: (!((
len) >= 1 && L
' ' == pathw[(
len)-1] || \
Definition at line 156 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_REINIT_W
#define PHP_WIN32_IOUTIL_REINIT_W |
( |
| path | ) |
|
Value: do { \
PHP_WIN32_IOUTIL_CLEANUP_W() \
} while (0);
Definition at line 151 of file ioutil.h.
◆ php_win32_ioutil_stat
Value:php_win32_ioutil_stat_ex(path,
buf, 0)
Definition at line 761 of file ioutil.h.
◆ PHP_WIN32_IOUTIL_UNC_PATH_PREFIX_LENW
#define PHP_WIN32_IOUTIL_UNC_PATH_PREFIX_LENW 8 |
◆ PHP_WIN32_IOUTIL_UNC_PATH_PREFIXW
#define PHP_WIN32_IOUTIL_UNC_PATH_PREFIXW L"\\\\?\\UNC\\" |
◆ php_win32_ioutil_utf8_to_w
◆ php_win32_ioutil_w_to_any
◆ php_win32_ioutil_w_to_thread
#define php_win32_ioutil_w_to_thread php_win32_cp_w_to_thread |
◆ php_win32_ioutil_w_to_utf8
◆ PW32IO
#define PW32IO __declspec(dllimport) |
◆ R_OK
◆ SYMLINK_FLAG_RELATIVE
#define SYMLINK_FLAG_RELATIVE 0x01 |
◆ W_OK
◆ X_OK
◆ mode_t
◆ php_win32_ioutil_dev_t
◆ php_win32_ioutil_ino_t
◆ PHP_WIN32_IOUTIL_PREPARSE_DATA_BUFFER
◆ php_win32_ioutil_size_t
◆ php_win32_ioutil_time_t
◆ php_win32_ioutil_encoding
Enumerator |
---|
PHP_WIN32_IOUTIL_IS_ASCII | |
PHP_WIN32_IOUTIL_IS_ANSI | |
PHP_WIN32_IOUTIL_IS_UTF8 | |
Definition at line 101 of file ioutil.h.
◆ php_win32_ioutil_normalization_result
Enumerator |
---|
PHP_WIN32_IOUTIL_NORM_OK | |
PHP_WIN32_IOUTIL_NORM_PARTIAL | |
PHP_WIN32_IOUTIL_NORM_FAIL | |
Definition at line 107 of file ioutil.h.
◆ php_win32_ioutil_access_w()
PW32IO int php_win32_ioutil_access_w |
( |
const wchar_t * | path, |
|
|
mode_t | mode ) |
◆ php_win32_ioutil_chdir_w()
PW32IO int php_win32_ioutil_chdir_w |
( |
const wchar_t * | path | ) |
|
◆ php_win32_ioutil_close()
PW32IO int php_win32_ioutil_close |
( |
int | fd | ) |
|
◆ php_win32_ioutil_dirname()
PW32IO size_t php_win32_ioutil_dirname |
( |
char * | buf, |
|
|
size_t | len ) |
◆ php_win32_ioutil_fopen_w()
PW32IO FILE * php_win32_ioutil_fopen_w |
( |
const wchar_t * | path, |
|
|
const wchar_t * | mode ) |
◆ php_win32_ioutil_fstat()
◆ php_win32_ioutil_getcwd_w()
PW32IO wchar_t * php_win32_ioutil_getcwd_w |
( |
wchar_t * | buf, |
|
|
size_t | len ) |
◆ php_win32_ioutil_link_w()
PW32IO int php_win32_ioutil_link_w |
( |
const wchar_t * | target, |
|
|
const wchar_t * | link ) |
◆ php_win32_ioutil_mkdir_w()
PW32IO int php_win32_ioutil_mkdir_w |
( |
const wchar_t * | path, |
|
|
mode_t | mode ) |
◆ php_win32_ioutil_normalize_path_w()
◆ php_win32_ioutil_open_w()
PW32IO int php_win32_ioutil_open_w |
( |
const wchar_t * | path, |
|
|
int | flags, |
|
|
| ... ) |
◆ php_win32_ioutil_posix_to_open_opts()
◆ php_win32_ioutil_readlink_w()
PW32IO ssize_t php_win32_ioutil_readlink_w |
( |
const wchar_t * | path, |
|
|
wchar_t * | buf, |
|
|
size_t | buf_len ) |
◆ php_win32_ioutil_realpath_w()
PW32IO wchar_t * php_win32_ioutil_realpath_w |
( |
const wchar_t * | path, |
|
|
wchar_t * | resolved ) |
◆ php_win32_ioutil_realpath_w_ex0()
PW32IO wchar_t * php_win32_ioutil_realpath_w_ex0 |
( |
const wchar_t * | path, |
|
|
wchar_t * | resolved, |
|
|
PBY_HANDLE_FILE_INFORMATION | info ) |
◆ php_win32_ioutil_rename_w()
PW32IO int php_win32_ioutil_rename_w |
( |
const wchar_t * | oldname, |
|
|
const wchar_t * | newname ) |
◆ php_win32_ioutil_stat_ex_w()
◆ php_win32_ioutil_symlink_w()
PW32IO int php_win32_ioutil_symlink_w |
( |
const wchar_t * | target, |
|
|
const wchar_t * | link ) |
◆ php_win32_ioutil_unlink_w()
PW32IO int php_win32_ioutil_unlink_w |
( |
const wchar_t * | path | ) |
|
◆ realpath()
PW32IO char * realpath |
( |
const char * | path, |
|
|
char * | resolved ) |