php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
filestat.c File Reference
#include "php.h"
#include "fopen_wrappers.h"
#include "php_globals.h"
#include <stdlib.h>
#include <sys/stat.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <time.h>
#include "basic_functions.h"
#include "php_filestat.h"

Go to the source code of this file.

Macros

#define IS_LINK_OPERATION(__t)
 
#define IS_EXISTS_CHECK(__t)
 
#define IS_ABLE_CHECK(__t)
 
#define IS_ACCESS_CHECK(__t)
 
#define FileFunction(name, funcnum)
 

Functions

 BG (CurrentLStatFile)
 
 PHP_FUNCTION (disk_total_space)
 
 PHP_FUNCTION (disk_free_space)
 
PHPAPI zend_result php_get_gid_by_name (const char *name, gid_t *gid)
 
 PHP_FUNCTION (chgrp)
 
PHPAPI zend_result php_get_uid_by_name (const char *name, uid_t *uid)
 
 PHP_FUNCTION (chown)
 
 PHP_FUNCTION (chmod)
 
PHPAPI void php_clear_stat_cache (bool clear_realpath_cache, const char *filename, size_t filename_len)
 
 PHP_FUNCTION (clearstatcache)
 
PHPAPI void php_stat (zend_string *filename, int type, zval *return_value)
 
 FileFunction (PHP_FN(fileperms), FS_PERMS)
 
 PHP_FUNCTION (realpath_cache_get)
 

Variables

return SUCCESS
 

Macro Definition Documentation

◆ FileFunction

#define FileFunction ( name,
funcnum )
Value:
zend_string *filename; \
\
ZEND_PARSE_PARAMETERS_START(1, 1) \
Z_PARAM_STR(filename) \
ZEND_PARSE_PARAMETERS_END(); \
\
php_stat(filename, funcnum, return_value); \
}
#define ZEND_NAMED_FUNCTION(name)
Definition zend_API.h:74
struct _zend_string zend_string
zval * return_value
zend_string * name

Definition at line 1016 of file filestat.c.

◆ IS_ABLE_CHECK

#define IS_ABLE_CHECK ( __t)
Value:
((__t) == FS_IS_R || (__t) == FS_IS_W || (__t) == FS_IS_X)
#define FS_IS_W
#define FS_IS_X
#define FS_IS_R

Definition at line 739 of file filestat.c.

◆ IS_ACCESS_CHECK

#define IS_ACCESS_CHECK ( __t)
Value:
zend_ffi_type * type
Definition ffi.c:3812
#define IS_ABLE_CHECK(__t)
#define FS_EXISTS

Definition at line 740 of file filestat.c.

◆ IS_EXISTS_CHECK

#define IS_EXISTS_CHECK ( __t)
Value:
((__t) == FS_EXISTS || (__t) == FS_IS_W || (__t) == FS_IS_R || (__t) == FS_IS_X || (__t) == FS_IS_FILE || (__t) == FS_IS_DIR || (__t) == FS_IS_LINK || (__t) == FS_LPERMS)
#define FS_IS_DIR
#define FS_LPERMS
#define FS_IS_FILE
#define FS_IS_LINK

Definition at line 738 of file filestat.c.

◆ IS_LINK_OPERATION

#define IS_LINK_OPERATION ( __t)
Value:
((__t) == FS_TYPE || (__t) == FS_IS_LINK || (__t) == FS_LSTAT || (__t) == FS_LPERMS)
#define FS_TYPE
#define FS_LSTAT

Definition at line 737 of file filestat.c.

Function Documentation

◆ BG()

BG ( CurrentLStatFile )

◆ FileFunction()

FileFunction ( PHP_FN(fileperms) ,
FS_PERMS  )

Definition at line 1029 of file filestat.c.

◆ php_clear_stat_cache()

PHPAPI void php_clear_stat_cache ( bool clear_realpath_cache,
const char * filename,
size_t filename_len )

Definition at line 697 of file filestat.c.

◆ PHP_FUNCTION() [1/7]

PHP_FUNCTION ( chgrp )

Definition at line 400 of file filestat.c.

◆ PHP_FUNCTION() [2/7]

PHP_FUNCTION ( chmod )

Definition at line 560 of file filestat.c.

◆ PHP_FUNCTION() [3/7]

PHP_FUNCTION ( chown )

Definition at line 543 of file filestat.c.

◆ PHP_FUNCTION() [4/7]

PHP_FUNCTION ( clearstatcache )

Definition at line 721 of file filestat.c.

◆ PHP_FUNCTION() [5/7]

PHP_FUNCTION ( disk_free_space )

Definition at line 249 of file filestat.c.

◆ PHP_FUNCTION() [6/7]

PHP_FUNCTION ( disk_total_space )

Definition at line 167 of file filestat.c.

◆ PHP_FUNCTION() [7/7]

PHP_FUNCTION ( realpath_cache_get )

Definition at line 1109 of file filestat.c.

◆ php_get_gid_by_name()

PHPAPI zend_result php_get_gid_by_name ( const char * name,
gid_t * gid )

Definition at line 275 of file filestat.c.

◆ php_get_uid_by_name()

PHPAPI zend_result php_get_uid_by_name ( const char * name,
uid_t * uid )

Definition at line 416 of file filestat.c.

◆ php_stat()

PHPAPI void php_stat ( zend_string * filename,
int type,
zval * return_value )

Definition at line 743 of file filestat.c.

Variable Documentation

◆ SUCCESS

return SUCCESS

Definition at line 89 of file filestat.c.