php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
plain_wrapper.c File Reference
#include "php.h"
#include "php_globals.h"
#include "php_network.h"
#include "php_open_temporary_file.h"
#include "ext/standard/file.h"
#include "ext/standard/flock_compat.h"
#include "ext/standard/php_filestat.h"
#include <stddef.h>
#include <fcntl.h>
#include "SAPI.h"
#include "php_streams_int.h"

Go to the source code of this file.

Data Structures

struct  php_stdio_stream_data
 

Macros

#define php_stream_fopen_from_fd_int(fd, mode, persistent_id)
 
#define php_stream_fopen_from_fd_int_rel(fd, mode, persistent_id)
 
#define php_stream_fopen_from_file_int(file, mode)
 
#define php_stream_fopen_from_file_int_rel(file, mode)
 
#define PLAIN_WRAP_BUF_SIZE(st)
 
#define fdatasync   fsync
 
#define PHP_STDIOP_GET_FD(anfd, data)
 

Functions

int php_get_uid_by_name (const char *name, uid_t *uid)
 
int php_get_gid_by_name (const char *name, gid_t *gid)
 
PHPAPI int php_stream_parse_fopen_modes (const char *mode, int *open_flags)
 
PHPAPI php_stream_php_stream_fopen_temporary_file (const char *dir, const char *pfx, zend_string **opened_path_ptr STREAMS_DC)
 
PHPAPI php_stream_php_stream_fopen_tmpfile (int dummy STREAMS_DC)
 
PHPAPI php_stream_php_stream_fopen_from_fd (int fd, const char *mode, const char *persistent_id, bool zero_position STREAMS_DC)
 
PHPAPI php_stream_php_stream_fopen_from_file (FILE *file, const char *mode STREAMS_DC)
 
PHPAPI php_stream_php_stream_fopen_from_pipe (FILE *file, const char *mode STREAMS_DC)
 
PHPAPI php_stream_php_stream_fopen (const char *filename, const char *mode, zend_string **opened_path, int options STREAMS_DC)
 
PHPAPI php_stream_php_stream_fopen_with_path (const char *filename, const char *mode, const char *path, zend_string **opened_path, int options STREAMS_DC)
 

Variables

PHPAPI php_stream_ops php_stream_stdio_ops
 
PHPAPI php_stream_wrapper php_plain_files_wrapper
 

Macro Definition Documentation

◆ fdatasync

#define fdatasync   fsync

Definition at line 63 of file plain_wrapper.c.

◆ PHP_STDIOP_GET_FD

#define PHP_STDIOP_GET_FD ( anfd,
data )
Value:
anfd = (data)->file ? fileno((data)->file) : (data)->fd
file(string $filename, int $flags=0, $context=null)
int fd
Definition phpdbg.h:282
zend_constant * data

Definition at line 160 of file plain_wrapper.c.

◆ php_stream_fopen_from_fd_int

#define php_stream_fopen_from_fd_int ( fd,
mode,
persistent_id )
Value:
_php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_CC)
char * mode
#define STREAMS_CC
Definition php_streams.h:54

Definition at line 46 of file plain_wrapper.c.

◆ php_stream_fopen_from_fd_int_rel

#define php_stream_fopen_from_fd_int_rel ( fd,
mode,
persistent_id )
Value:
_php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_REL_CC)
#define STREAMS_REL_CC
Definition php_streams.h:55

Definition at line 47 of file plain_wrapper.c.

◆ php_stream_fopen_from_file_int

#define php_stream_fopen_from_file_int ( file,
mode )
Value:
_php_stream_fopen_from_file_int((file), (mode) STREAMS_CC)

Definition at line 48 of file plain_wrapper.c.

◆ php_stream_fopen_from_file_int_rel

#define php_stream_fopen_from_file_int_rel ( file,
mode )
Value:
_php_stream_fopen_from_file_int((file), (mode) STREAMS_REL_CC)

Definition at line 49 of file plain_wrapper.c.

◆ PLAIN_WRAP_BUF_SIZE

#define PLAIN_WRAP_BUF_SIZE ( st)
Value:
(st)

Definition at line 61 of file plain_wrapper.c.

Function Documentation

◆ _php_stream_fopen()

PHPAPI php_stream * _php_stream_fopen ( const char * filename,
const char * mode,
zend_string ** opened_path,
int options STREAMS_DC )

Definition at line 1119 of file plain_wrapper.c.

◆ _php_stream_fopen_from_fd()

PHPAPI php_stream * _php_stream_fopen_from_fd ( int fd,
const char * mode,
const char * persistent_id,
bool zero_position STREAMS_DC )

Definition at line 278 of file plain_wrapper.c.

◆ _php_stream_fopen_from_file()

PHPAPI php_stream * _php_stream_fopen_from_file ( FILE * file,
const char *mode STREAMS_DC )

Definition at line 307 of file plain_wrapper.c.

◆ _php_stream_fopen_from_pipe()

PHPAPI php_stream * _php_stream_fopen_from_pipe ( FILE * file,
const char *mode STREAMS_DC )

Definition at line 326 of file plain_wrapper.c.

◆ _php_stream_fopen_temporary_file()

PHPAPI php_stream * _php_stream_fopen_temporary_file ( const char * dir,
const char * pfx,
zend_string **opened_path_ptr STREAMS_DC )

Definition at line 217 of file plain_wrapper.c.

◆ _php_stream_fopen_tmpfile()

PHPAPI php_stream * _php_stream_fopen_tmpfile ( int dummy STREAMS_DC)

Definition at line 250 of file plain_wrapper.c.

◆ _php_stream_fopen_with_path()

PHPAPI php_stream * _php_stream_fopen_with_path ( const char * filename,
const char * mode,
const char * path,
zend_string ** opened_path,
int options STREAMS_DC )

Definition at line 1627 of file plain_wrapper.c.

◆ php_get_gid_by_name()

int php_get_gid_by_name ( const char * name,
gid_t * gid )
extern

Definition at line 275 of file filestat.c.

◆ php_get_uid_by_name()

int php_get_uid_by_name ( const char * name,
uid_t * uid )
extern

Definition at line 416 of file filestat.c.

◆ php_stream_parse_fopen_modes()

PHPAPI int php_stream_parse_fopen_modes ( const char * mode,
int * open_flags )

Definition at line 71 of file plain_wrapper.c.

Variable Documentation

◆ php_plain_files_wrapper

PHPAPI php_stream_wrapper php_plain_files_wrapper
Initial value:
= {
&php_plain_files_wrapper_ops,
0
}
#define NULL
Definition gdcache.h:45

Definition at line 1620 of file plain_wrapper.c.

◆ php_stream_stdio_ops

PHPAPI php_stream_ops php_stream_stdio_ops
Initial value:
= {
php_stdiop_write, php_stdiop_read,
php_stdiop_close, php_stdiop_flush,
"STDIO",
php_stdiop_seek,
php_stdiop_cast,
php_stdiop_stat,
php_stdiop_set_option
}
ssize_t(* php_stdiop_write)(php_stream *, const char *, size_t)
Definition phpdbg.h:284

Definition at line 1024 of file plain_wrapper.c.