php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
ioutil.c File Reference
#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 "php.h"
#include "SAPI.h"
#include "win32/winutil.h"
#include "win32/time.h"
#include "win32/ioutil.h"
#include "win32/codepage.h"
#include "main/streams/php_stream_plain_wrapper.h"
#include <pathcch.h>
#include <winioctl.h>
#include <winnt.h>

Go to the source code of this file.

Macros

#define FILETIME_TO_UINT(filetime)
 
#define FILETIME_TO_TIME_T(filetime)
 

Typedefs

typedef HRESULT(__stdcall * MyPathCchCanonicalizeEx) (wchar_t *pszPathOut, size_t cchPathOut, const wchar_t *pszPathIn, unsigned long dwFlags)
 

Functions

PW32IO BOOL php_win32_ioutil_posix_to_open_opts (int flags, mode_t mode, php_ioutil_open_opts *opts)
 
PW32IO int php_win32_ioutil_open_w (const wchar_t *path, int flags,...)
 
PW32IO int php_win32_ioutil_close (int fd)
 
PW32IO int php_win32_ioutil_mkdir_w (const wchar_t *path, mode_t mode)
 
PW32IO int php_win32_ioutil_unlink_w (const wchar_t *path)
 
PW32IO int php_win32_ioutil_rmdir_w (const wchar_t *path)
 
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 size_t php_win32_ioutil_dirname (char *path, size_t len)
 
PW32IO php_win32_ioutil_normalization_result php_win32_ioutil_normalize_path_w (wchar_t **buf, size_t len, size_t *new_len)
 
BOOL php_win32_ioutil_init (void)
 
PW32IO int php_win32_ioutil_access_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 char * realpath (const char *path, char *resolved)
 
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 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)
 

Macro Definition Documentation

◆ FILETIME_TO_TIME_T

#define FILETIME_TO_TIME_T ( filetime)
Value:
(time_t)(FILETIME_TO_UINT(filetime) / 10000000ULL)
#define FILETIME_TO_UINT(filetime)
Definition ioutil.c:852

Definition at line 855 of file ioutil.c.

◆ FILETIME_TO_UINT

#define FILETIME_TO_UINT ( filetime)
Value:
(*((uint64_t*) &(filetime)) - 116444736000000000ULL)

Definition at line 852 of file ioutil.c.

Typedef Documentation

◆ MyPathCchCanonicalizeEx

typedef HRESULT(__stdcall * MyPathCchCanonicalizeEx) (wchar_t *pszPathOut, size_t cchPathOut, const wchar_t *pszPathIn, unsigned long dwFlags)

Definition at line 70 of file ioutil.c.

Function Documentation

◆ php_win32_ioutil_access_w()

PW32IO int php_win32_ioutil_access_w ( const wchar_t * path,
mode_t mode )

Definition at line 667 of file ioutil.c.

◆ php_win32_ioutil_chdir_w()

PW32IO int php_win32_ioutil_chdir_w ( const wchar_t * path)

Definition at line 454 of file ioutil.c.

◆ php_win32_ioutil_close()

PW32IO int php_win32_ioutil_close ( int fd)

Definition at line 261 of file ioutil.c.

◆ php_win32_ioutil_dirname()

PW32IO size_t php_win32_ioutil_dirname ( char * path,
size_t len )

Definition at line 521 of file ioutil.c.

◆ php_win32_ioutil_fopen_w()

PW32IO FILE * php_win32_ioutil_fopen_w ( const wchar_t * path,
const wchar_t * mode )

Definition at line 695 of file ioutil.c.

◆ php_win32_ioutil_fstat()

PW32IO int php_win32_ioutil_fstat ( int fd,
php_win32_ioutil_stat_t * buf )

Definition at line 1022 of file ioutil.c.

◆ php_win32_ioutil_getcwd_w()

PW32IO wchar_t * php_win32_ioutil_getcwd_w ( wchar_t * buf,
size_t len )

Definition at line 484 of file ioutil.c.

◆ php_win32_ioutil_init()

BOOL php_win32_ioutil_init ( void )

Definition at line 651 of file ioutil.c.

◆ php_win32_ioutil_link_w()

PW32IO int php_win32_ioutil_link_w ( const wchar_t * target,
const wchar_t * link )

Definition at line 839 of file ioutil.c.

◆ php_win32_ioutil_mkdir_w()

PW32IO int php_win32_ioutil_mkdir_w ( const wchar_t * path,
mode_t mode )

Definition at line 286 of file ioutil.c.

◆ php_win32_ioutil_normalize_path_w()

PW32IO php_win32_ioutil_normalization_result php_win32_ioutil_normalize_path_w ( wchar_t ** buf,
size_t len,
size_t * new_len )

Definition at line 601 of file ioutil.c.

◆ php_win32_ioutil_open_w()

PW32IO int php_win32_ioutil_open_w ( const wchar_t * path,
int flags,
... )

Definition at line 187 of file ioutil.c.

◆ php_win32_ioutil_posix_to_open_opts()

PW32IO BOOL php_win32_ioutil_posix_to_open_opts ( int flags,
mode_t mode,
php_ioutil_open_opts * opts )

Definition at line 74 of file ioutil.c.

◆ php_win32_ioutil_readlink_w()

PW32IO ssize_t php_win32_ioutil_readlink_w ( const wchar_t * path,
wchar_t * buf,
size_t buf_len )

Definition at line 1142 of file ioutil.c.

◆ php_win32_ioutil_realpath_w()

PW32IO wchar_t * php_win32_ioutil_realpath_w ( const wchar_t * path,
wchar_t * resolved )

Definition at line 770 of file ioutil.c.

◆ 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 )

Definition at line 775 of file ioutil.c.

◆ php_win32_ioutil_rename_w()

PW32IO int php_win32_ioutil_rename_w ( const wchar_t * oldname,
const wchar_t * newname )

Definition at line 467 of file ioutil.c.

◆ php_win32_ioutil_rmdir_w()

PW32IO int php_win32_ioutil_rmdir_w ( const wchar_t * path)

Definition at line 439 of file ioutil.c.

◆ php_win32_ioutil_stat_ex_w()

PW32IO int php_win32_ioutil_stat_ex_w ( const wchar_t * path,
size_t path_len,
php_win32_ioutil_stat_t * buf,
int lstat )

Definition at line 972 of file ioutil.c.

◆ php_win32_ioutil_symlink_w()

PW32IO int php_win32_ioutil_symlink_w ( const wchar_t * target,
const wchar_t * link )

Definition at line 820 of file ioutil.c.

◆ php_win32_ioutil_unlink_w()

PW32IO int php_win32_ioutil_unlink_w ( const wchar_t * path)

Definition at line 368 of file ioutil.c.

◆ realpath()

PW32IO char * realpath ( const char * path,
char * resolved )

Definition at line 815 of file ioutil.c.