php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_streams.h File Reference

Go to the source code of this file.

Data Structures

struct  _php_stream_statbuf
 
struct  _php_stream_dirent
 
struct  _php_stream_ops
 
struct  _php_stream_wrapper_ops
 
struct  _php_stream_wrapper
 
struct  _php_stream
 

Macros

#define STREAMS_D
 
#define STREAMS_C
 
#define STREAMS_REL_C
 
#define STREAMS_DC
 
#define STREAMS_CC
 
#define STREAMS_REL_CC
 
#define php_stream_alloc_rel(ops, thisptr, persistent, mode)
 
#define php_stream_copy_to_mem_rel(src, maxlen, persistent)
 
#define php_stream_fopen_rel(filename, mode, opened, options)
 
#define php_stream_fopen_with_path_rel(filename, mode, path, opened, options)
 
#define php_stream_fopen_from_fd_rel(fd, mode, persistent_id, zero_position)
 
#define php_stream_fopen_from_file_rel(file, mode)
 
#define php_stream_fopen_from_pipe_rel(file, mode)
 
#define php_stream_fopen_tmpfile_rel()
 
#define php_stream_fopen_temporary_file_rel(dir, pfx, opened_path)
 
#define php_stream_open_wrapper_rel(path, mode, options, opened)
 
#define php_stream_open_wrapper_ex_rel(path, mode, options, opened, context)
 
#define php_stream_make_seekable_rel(origstream, newstream, flags)
 
#define PHP_STREAM_FLAG_NO_SEEK   0x1
 
#define PHP_STREAM_FLAG_NO_BUFFER   0x2
 
#define PHP_STREAM_FLAG_EOL_UNIX   0x0 /* also includes DOS */
 
#define PHP_STREAM_FLAG_DETECT_EOL   0x4
 
#define PHP_STREAM_FLAG_EOL_MAC   0x8
 
#define PHP_STREAM_FLAG_AVOID_BLOCKING   0x10
 
#define PHP_STREAM_FLAG_NO_CLOSE   0x20
 
#define PHP_STREAM_FLAG_IS_DIR   0x40
 
#define PHP_STREAM_FLAG_NO_FCLOSE   0x80
 
#define PHP_STREAM_FLAG_SUPPRESS_ERRORS   0x100
 
#define PHP_STREAM_FLAG_NO_RSCR_DTOR_CLOSE   0x200
 
#define PHP_STREAM_FLAG_NO_IO   0x400
 
#define PHP_STREAM_FLAG_WAS_WRITTEN   0x80000000
 
#define PHP_STREAM_CONTEXT(stream)
 
#define PHP_STREAM_FCLOSE_NONE   0
 
#define PHP_STREAM_FCLOSE_FDOPEN   1
 
#define PHP_STREAM_FCLOSE_FOPENCOOKIE   2
 
#define php_stream_alloc(ops, thisptr, persistent_id, mode)
 
#define php_stream_get_resource_id(stream)
 
#define php_stream_auto_cleanup(stream)
 
#define php_stream_to_zval(stream, zval)
 
#define php_stream_from_zval(xstr, pzval)
 
#define php_stream_from_res(xstr, res)
 
#define php_stream_from_res_no_verify(xstr, pzval)
 
#define php_stream_from_zval_no_verify(xstr, pzval)
 
#define php_stream_free_enclosed(stream_enclosed, close_options)
 
#define PHP_STREAM_PERSISTENT_SUCCESS   0 /* id exists */
 
#define PHP_STREAM_PERSISTENT_FAILURE   1 /* id exists but is not a stream! */
 
#define PHP_STREAM_PERSISTENT_NOT_EXIST   2 /* id does not exist */
 
#define PHP_STREAM_FREE_CALL_DTOR   1 /* call ops->close */
 
#define PHP_STREAM_FREE_RELEASE_STREAM   2 /* pefree(stream) */
 
#define PHP_STREAM_FREE_PRESERVE_HANDLE   4 /* tell ops->close to not close its underlying handle */
 
#define PHP_STREAM_FREE_RSRC_DTOR   8 /* called from the resource list dtor */
 
#define PHP_STREAM_FREE_PERSISTENT   16 /* manually freeing a persistent connection */
 
#define PHP_STREAM_FREE_IGNORE_ENCLOSING   32 /* don't close the enclosing stream instead */
 
#define PHP_STREAM_FREE_KEEP_RSRC   64 /* keep associated zend_resource */
 
#define PHP_STREAM_FREE_CLOSE   (PHP_STREAM_FREE_CALL_DTOR | PHP_STREAM_FREE_RELEASE_STREAM)
 
#define PHP_STREAM_FREE_CLOSE_CASTED   (PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_PRESERVE_HANDLE)
 
#define PHP_STREAM_FREE_CLOSE_PERSISTENT   (PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_PERSISTENT)
 
#define php_stream_free(stream, close_options)
 
#define php_stream_close(stream)
 
#define php_stream_pclose(stream)
 
#define php_stream_rewind(stream)
 
#define php_stream_seek(stream, offset, whence)
 
#define php_stream_tell(stream)
 
#define php_stream_read(stream, buf, count)
 
#define php_stream_write_string(stream, str)
 
#define php_stream_write(stream, buf, count)
 
#define php_stream_fill_read_buffer(stream, size)
 
#define php_stream_printf   _php_stream_printf
 
#define php_stream_eof(stream)
 
#define php_stream_getc(stream)
 
#define php_stream_putc(stream, c)
 
#define php_stream_flush(stream)
 
#define php_stream_sync(stream, d)
 
#define php_stream_gets(stream, buf, maxlen)
 
#define php_stream_get_line(stream, buf, maxlen, retlen)
 
#define php_stream_puts(stream, buf)
 
#define php_stream_stat(stream, ssb)
 
#define php_stream_stat_path(path, ssb)
 
#define php_stream_stat_path_ex(path, flags, ssb, context)
 
#define php_stream_mkdir(path, mode, options, context)
 
#define php_stream_rmdir(path, options, context)
 
#define php_stream_opendir(path, options, context)
 
#define php_stream_readdir(dirstream, dirent)
 
#define php_stream_closedir(dirstream)
 
#define php_stream_rewinddir(dirstream)
 
#define php_stream_scandir(dirname, namelist, context, compare)
 
#define php_stream_set_option(stream, option, value, ptrvalue)
 
#define php_stream_set_chunk_size(stream, size)
 
#define PHP_STREAM_MKDIR_RECURSIVE   1
 
#define PHP_STREAM_URL_STAT_LINK   1
 
#define PHP_STREAM_URL_STAT_QUIET   2
 
#define PHP_STREAM_URL_STAT_IGNORE_OPEN_BASEDIR   4
 
#define PHP_STREAM_OPTION_BLOCKING   1
 
#define PHP_STREAM_OPTION_READ_BUFFER   2
 
#define PHP_STREAM_OPTION_WRITE_BUFFER   3
 
#define PHP_STREAM_BUFFER_NONE   0 /* unbuffered */
 
#define PHP_STREAM_BUFFER_LINE   1 /* line buffered */
 
#define PHP_STREAM_BUFFER_FULL   2 /* fully buffered */
 
#define PHP_STREAM_OPTION_READ_TIMEOUT   4
 
#define PHP_STREAM_OPTION_SET_CHUNK_SIZE   5
 
#define PHP_STREAM_OPTION_LOCKING   6
 
#define PHP_STREAM_LOCK_SUPPORTED   1
 
#define php_stream_supports_lock(stream)
 
#define php_stream_lock(stream, mode)
 
#define PHP_STREAM_OPTION_XPORT_API   7 /* see php_stream_transport.h */
 
#define PHP_STREAM_OPTION_CRYPTO_API   8 /* see php_stream_transport.h */
 
#define PHP_STREAM_OPTION_MMAP_API   9 /* see php_stream_mmap.h */
 
#define PHP_STREAM_OPTION_TRUNCATE_API   10
 
#define PHP_STREAM_TRUNCATE_SUPPORTED   0
 
#define PHP_STREAM_TRUNCATE_SET_SIZE   1 /* ptrparam is a pointer to a size_t */
 
#define php_stream_truncate_supported(stream)
 
#define php_stream_truncate_set_size(stream, size)
 
#define PHP_STREAM_OPTION_META_DATA_API   11 /* ptrparam is a zval* to which to add metadata information */
 
#define php_stream_populate_meta_data(stream, zv)
 
#define PHP_STREAM_OPTION_CHECK_LIVENESS   12 /* no parameters */
 
#define PHP_STREAM_OPTION_PIPE_BLOCKING   13
 
#define PHP_STREAM_OPTION_SYNC_API   14
 
#define PHP_STREAM_SYNC_SUPPORTED   0
 
#define PHP_STREAM_SYNC_FSYNC   1
 
#define PHP_STREAM_SYNC_FDSYNC   2
 
#define php_stream_sync_supported(stream)
 
#define PHP_STREAM_OPTION_RETURN_OK   0 /* option set OK */
 
#define PHP_STREAM_OPTION_RETURN_ERR   -1 /* problem setting option */
 
#define PHP_STREAM_OPTION_RETURN_NOTIMPL   -2 /* underlying stream does not implement; streams can handle it instead */
 
#define PHP_STREAM_COPY_ALL   ((size_t)-1)
 
#define php_stream_copy_to_stream(src, dest, maxlen)
 
#define php_stream_copy_to_stream_ex(src, dest, maxlen, len)
 
#define php_stream_copy_to_mem(src, maxlen, persistent)
 
#define php_stream_passthru(stream)
 
#define PHP_STREAM_AS_STDIO   0
 
#define PHP_STREAM_AS_FD   1
 
#define PHP_STREAM_AS_SOCKETD   2
 
#define PHP_STREAM_AS_FD_FOR_SELECT   3
 
#define PHP_STREAM_CAST_TRY_HARD   0x80000000
 
#define PHP_STREAM_CAST_RELEASE   0x40000000 /* stream becomes invalid on success */
 
#define PHP_STREAM_CAST_INTERNAL   0x20000000 /* stream cast for internal use */
 
#define PHP_STREAM_CAST_MASK   (PHP_STREAM_CAST_TRY_HARD | PHP_STREAM_CAST_RELEASE | PHP_STREAM_CAST_INTERNAL)
 
#define php_stream_can_cast(stream, as)
 
#define php_stream_cast(stream, as, ret, show_err)
 
#define php_stream_is(stream, anops)
 
#define PHP_STREAM_IS_STDIO   &php_stream_stdio_ops
 
#define php_stream_is_persistent(stream)
 
#define IGNORE_PATH   0x00000000
 
#define USE_PATH   0x00000001
 
#define IGNORE_URL   0x00000002
 
#define REPORT_ERRORS   0x00000008
 
#define STREAM_MUST_SEEK   0x00000010
 
#define STREAM_WILL_CAST   0x00000020
 
#define STREAM_LOCATE_WRAPPERS_ONLY   0x00000040
 
#define STREAM_OPEN_FOR_INCLUDE   0x00000080
 
#define STREAM_USE_URL   0x00000100
 
#define STREAM_ONLY_GET_HEADERS   0x00000200
 
#define STREAM_DISABLE_OPEN_BASEDIR   0x00000400
 
#define STREAM_OPEN_PERSISTENT   0x00000800
 
#define STREAM_USE_GLOB_DIR_OPEN   0x00001000
 
#define STREAM_DISABLE_URL_PROTECTION   0x00002000
 
#define STREAM_ASSUME_REALPATH   0x00004000
 
#define STREAM_USE_BLOCKING_PIPE   0x00008000
 
#define STREAM_OPEN_FOR_ZEND_STREAM   0x00010000
 
#define php_stream_open_wrapper(path, mode, options, opened)
 
#define php_stream_open_wrapper_ex(path, mode, options, opened, context)
 
#define PHP_STREAM_UNCHANGED   0 /* orig stream was seekable anyway */
 
#define PHP_STREAM_RELEASED   1 /* newstream should be used; origstream is no longer valid */
 
#define PHP_STREAM_FAILED   2 /* an error occurred while attempting conversion */
 
#define PHP_STREAM_CRITICAL   3 /* an error occurred; origstream is in an unknown state; you should close origstream */
 
#define PHP_STREAM_NO_PREFERENCE   0
 
#define PHP_STREAM_PREFER_STDIO   1
 
#define PHP_STREAM_FORCE_CONVERSION   2
 
#define php_stream_make_seekable(origstream, newstream, flags)
 
#define php_stream_get_url_stream_wrappers_hash()
 
#define php_get_stream_filters_hash()
 
#define PHP_STREAM_IS_URL   1
 
#define PHP_STREAM_META_TOUCH   1
 
#define PHP_STREAM_META_OWNER_NAME   2
 
#define PHP_STREAM_META_OWNER   3
 
#define PHP_STREAM_META_GROUP_NAME   4
 
#define PHP_STREAM_META_GROUP   5
 
#define PHP_STREAM_META_ACCESS   6
 

Typedefs

typedef struct _php_stream php_stream
 
typedef struct _php_stream_wrapper php_stream_wrapper
 
typedef struct _php_stream_context php_stream_context
 
typedef struct _php_stream_filter php_stream_filter
 
typedef struct _php_stream_statbuf php_stream_statbuf
 
typedef struct _php_stream_dirent php_stream_dirent
 
typedef struct _php_stream_ops php_stream_ops
 
typedef struct _php_stream_wrapper_ops php_stream_wrapper_ops
 

Functions

PHPAPI int php_file_le_stream (void)
 
PHPAPI int php_file_le_pstream (void)
 
PHPAPI int php_file_le_stream_filter (void)
 
PHPAPI php_stream_php_stream_alloc (const php_stream_ops *ops, void *abstract, const char *persistent_id, const char *mode STREAMS_DC)
 
PHPAPI php_streamphp_stream_encloses (php_stream *enclosing, php_stream *enclosed)
 
PHPAPI int _php_stream_free_enclosed (php_stream *stream_enclosed, int close_options)
 
PHPAPI int php_stream_from_persistent_id (const char *persistent_id, php_stream **stream)
 
PHPAPI int _php_stream_free (php_stream *stream, int close_options)
 
PHPAPI int _php_stream_seek (php_stream *stream, zend_off_t offset, int whence)
 
PHPAPI zend_off_t _php_stream_tell (php_stream *stream)
 
PHPAPI ssize_t _php_stream_read (php_stream *stream, char *buf, size_t count)
 
PHPAPI zend_stringphp_stream_read_to_str (php_stream *stream, size_t len)
 
PHPAPI ssize_t _php_stream_write (php_stream *stream, const char *buf, size_t count)
 
PHPAPI zend_result _php_stream_fill_read_buffer (php_stream *stream, size_t size)
 
PHPAPI ssize_t _php_stream_printf (php_stream *stream, const char *fmt,...) PHP_ATTRIBUTE_FORMAT(printf
 
PHPAPI bool _php_stream_eof (php_stream *stream)
 
PHPAPI int _php_stream_getc (php_stream *stream)
 
PHPAPI int _php_stream_putc (php_stream *stream, int c)
 
PHPAPI int _php_stream_flush (php_stream *stream, int closing)
 
PHPAPI int _php_stream_sync (php_stream *stream, bool data_only)
 
PHPAPI char * _php_stream_get_line (php_stream *stream, char *buf, size_t maxlen, size_t *returned_len)
 
PHPAPI zend_stringphp_stream_get_record (php_stream *stream, size_t maxlen, const char *delim, size_t delim_len)
 
PHPAPI bool _php_stream_puts (php_stream *stream, const char *buf)
 
PHPAPI int _php_stream_stat (php_stream *stream, php_stream_statbuf *ssb)
 
PHPAPI int _php_stream_stat_path (const char *path, int flags, php_stream_statbuf *ssb, php_stream_context *context)
 
PHPAPI int _php_stream_mkdir (const char *path, int mode, int options, php_stream_context *context)
 
PHPAPI int _php_stream_rmdir (const char *path, int options, php_stream_context *context)
 
PHPAPI php_stream_php_stream_opendir (const char *path, int options, php_stream_context *context STREAMS_DC)
 
PHPAPI php_stream_dirent_php_stream_readdir (php_stream *dirstream, php_stream_dirent *ent)
 
PHPAPI int php_stream_dirent_alphasort (const zend_string **a, const zend_string **b)
 
PHPAPI int php_stream_dirent_alphasortr (const zend_string **a, const zend_string **b)
 
PHPAPI int _php_stream_scandir (const char *dirname, zend_string **namelist[], int flags, php_stream_context *context, int(*compare)(const zend_string **a, const zend_string **b))
 
PHPAPI int _php_stream_set_option (php_stream *stream, int option, int value, void *ptrparam)
 
PHPAPI int _php_stream_truncate_set_size (php_stream *stream, size_t newsize)
 
ZEND_ATTRIBUTE_DEPRECATED PHPAPI size_t _php_stream_copy_to_stream (php_stream *src, php_stream *dest, size_t maxlen STREAMS_DC)
 
PHPAPI zend_result _php_stream_copy_to_stream_ex (php_stream *src, php_stream *dest, size_t maxlen, size_t *len STREAMS_DC)
 
PHPAPI zend_string_php_stream_copy_to_mem (php_stream *src, size_t maxlen, int persistent STREAMS_DC)
 
PHPAPI ssize_t _php_stream_passthru (php_stream *src STREAMS_DC)
 
PHPAPI int _php_stream_cast (php_stream *stream, int castas, void **ret, int show_err)
 
int php_init_stream_wrappers (int module_number)
 
void php_shutdown_stream_wrappers (int module_number)
 
void php_shutdown_stream_hashes (void)
 
 PHP_RSHUTDOWN_FUNCTION (streams)
 
PHPAPI zend_result php_register_url_stream_wrapper (const char *protocol, const php_stream_wrapper *wrapper)
 
PHPAPI zend_result php_unregister_url_stream_wrapper (const char *protocol)
 
PHPAPI zend_result php_register_url_stream_wrapper_volatile (zend_string *protocol, php_stream_wrapper *wrapper)
 
PHPAPI zend_result php_unregister_url_stream_wrapper_volatile (zend_string *protocol)
 
PHPAPI php_stream_php_stream_open_wrapper_ex (const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC)
 
PHPAPI php_stream_wrapperphp_stream_locate_url_wrapper (const char *path, const char **path_for_open, int options)
 
PHPAPI const char * php_stream_locate_eol (php_stream *stream, zend_string *buf)
 
PHPAPI void php_stream_wrapper_log_error (const php_stream_wrapper *wrapper, int options, const char *fmt,...) PHP_ATTRIBUTE_FORMAT(printf
 
PHPAPI int _php_stream_make_seekable (php_stream *origstream, php_stream **newstream, int flags STREAMS_DC)
 
PHPAPI HashTable_php_stream_get_url_stream_wrappers_hash (void)
 
PHPAPI HashTablephp_stream_get_url_stream_wrappers_hash_global (void)
 
PHPAPI HashTable_php_get_stream_filters_hash (void)
 
PHPAPI HashTablephp_get_stream_filters_hash_global (void)
 

Variables

const php_stream_wrapper_opsphp_stream_user_wrapper_ops
 

Macro Definition Documentation

◆ IGNORE_PATH

#define IGNORE_PATH   0x00000000

Definition at line 533 of file php_streams.h.

◆ IGNORE_URL

#define IGNORE_URL   0x00000002

Definition at line 535 of file php_streams.h.

◆ php_get_stream_filters_hash

#define php_get_stream_filters_hash ( )
Value:
PHPAPI HashTable * _php_get_stream_filters_hash(void)
Definition filter.c:37

Definition at line 619 of file php_streams.h.

◆ php_stream_alloc

#define php_stream_alloc ( ops,
thisptr,
persistent_id,
mode )
Value:
_php_stream_alloc((ops), (thisptr), (persistent_id), (mode) STREAMS_CC)
const php_stream_filter_ops * ops
Definition filters.c:1899
char * mode
#define STREAMS_CC
Definition php_streams.h:54
PHPAPI php_stream * _php_stream_alloc(const php_stream_ops *ops, void *abstract, const char *persistent_id, const char *mode STREAMS_DC)
Definition streams.c:278

Definition at line 263 of file php_streams.h.

◆ php_stream_alloc_rel

#define php_stream_alloc_rel ( ops,
thisptr,
persistent,
mode )
Value:
ffi persistent
Definition ffi.c:3633
#define STREAMS_REL_CC
Definition php_streams.h:55

Definition at line 60 of file php_streams.h.

◆ PHP_STREAM_AS_FD

#define PHP_STREAM_AS_FD   1

Definition at line 506 of file php_streams.h.

◆ PHP_STREAM_AS_FD_FOR_SELECT

#define PHP_STREAM_AS_FD_FOR_SELECT   3

Definition at line 510 of file php_streams.h.

◆ PHP_STREAM_AS_SOCKETD

#define PHP_STREAM_AS_SOCKETD   2

Definition at line 508 of file php_streams.h.

◆ PHP_STREAM_AS_STDIO

#define PHP_STREAM_AS_STDIO   0

Definition at line 504 of file php_streams.h.

◆ php_stream_auto_cleanup

#define php_stream_auto_cleanup ( stream)
Value:
{ (stream)->__exposed = 1; }

Definition at line 267 of file php_streams.h.

◆ PHP_STREAM_BUFFER_FULL

#define PHP_STREAM_BUFFER_FULL   2 /* fully buffered */

Definition at line 420 of file php_streams.h.

◆ PHP_STREAM_BUFFER_LINE

#define PHP_STREAM_BUFFER_LINE   1 /* line buffered */

Definition at line 419 of file php_streams.h.

◆ PHP_STREAM_BUFFER_NONE

#define PHP_STREAM_BUFFER_NONE   0 /* unbuffered */

Definition at line 418 of file php_streams.h.

◆ php_stream_can_cast

#define php_stream_can_cast ( stream,
as )
Value:
_php_stream_cast((stream), (as), NULL, 0)
#define NULL
Definition gdcache.h:45
PHPAPI int _php_stream_cast(php_stream *stream, int castas, void **ret, int show_err)
Definition cast.c:194

Definition at line 521 of file php_streams.h.

◆ php_stream_cast

#define php_stream_cast ( stream,
as,
ret,
show_err )
Value:
_php_stream_cast((stream), (as), (ret), (show_err))
zval * ret

Definition at line 522 of file php_streams.h.

◆ PHP_STREAM_CAST_INTERNAL

#define PHP_STREAM_CAST_INTERNAL   0x20000000 /* stream cast for internal use */

Definition at line 515 of file php_streams.h.

◆ PHP_STREAM_CAST_MASK

Definition at line 516 of file php_streams.h.

◆ PHP_STREAM_CAST_RELEASE

#define PHP_STREAM_CAST_RELEASE   0x40000000 /* stream becomes invalid on success */

Definition at line 514 of file php_streams.h.

◆ PHP_STREAM_CAST_TRY_HARD

#define PHP_STREAM_CAST_TRY_HARD   0x80000000

Definition at line 513 of file php_streams.h.

◆ php_stream_close

#define php_stream_close ( stream)
Value:
PHPAPI int _php_stream_free(php_stream *stream, int close_options)
Definition streams.c:365
#define PHP_STREAM_FREE_CLOSE

Definition at line 311 of file php_streams.h.

◆ php_stream_closedir

#define php_stream_closedir ( dirstream)
Value:
php_stream_close((dirstream))
#define php_stream_close(stream)

Definition at line 380 of file php_streams.h.

◆ PHP_STREAM_CONTEXT

#define PHP_STREAM_CONTEXT ( stream)
Value:
((php_stream_context*) ((stream)->ctx ? ((stream)->ctx->ptr) : NULL))
struct _php_stream_context php_stream_context
Definition php_streams.h:98

Definition at line 250 of file php_streams.h.

◆ PHP_STREAM_COPY_ALL

#define PHP_STREAM_COPY_ALL   ((size_t)-1)

Definition at line 476 of file php_streams.h.

◆ php_stream_copy_to_mem

#define php_stream_copy_to_mem ( src,
maxlen,
persistent )
Value:
zend_long maxlen
PHPAPI zend_string * _php_stream_copy_to_mem(php_stream *src, size_t maxlen, int persistent STREAMS_DC)
Definition streams.c:1520

Definition at line 489 of file php_streams.h.

◆ php_stream_copy_to_mem_rel

#define php_stream_copy_to_mem_rel ( src,
maxlen,
persistent )
Value:
zend_ffi_ctype_name_buf buf
Definition ffi.c:4685

Definition at line 62 of file php_streams.h.

◆ php_stream_copy_to_stream

#define php_stream_copy_to_stream ( src,
dest,
maxlen )
Value:
ZEND_ATTRIBUTE_DEPRECATED PHPAPI size_t _php_stream_copy_to_stream(php_stream *src, php_stream *dest, size_t maxlen STREAMS_DC)
Definition streams.c:1812

Definition at line 481 of file php_streams.h.

◆ php_stream_copy_to_stream_ex

#define php_stream_copy_to_stream_ex ( src,
dest,
maxlen,
len )
Value:
size_t len
Definition apprentice.c:174
PHPAPI zend_result _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size_t maxlen, size_t *len STREAMS_DC)
Definition streams.c:1613

Definition at line 483 of file php_streams.h.

◆ PHP_STREAM_CRITICAL

#define PHP_STREAM_CRITICAL   3 /* an error occurred; origstream is in an unknown state; you should close origstream */

Definition at line 606 of file php_streams.h.

◆ php_stream_eof

#define php_stream_eof ( stream)
Value:
_php_stream_eof((stream))
PHPAPI bool _php_stream_eof(php_stream *stream)
Definition streams.c:810

Definition at line 339 of file php_streams.h.

◆ PHP_STREAM_FAILED

#define PHP_STREAM_FAILED   2 /* an error occurred while attempting conversion */

Definition at line 605 of file php_streams.h.

◆ PHP_STREAM_FCLOSE_FDOPEN

#define PHP_STREAM_FCLOSE_FDOPEN   1

Definition at line 255 of file php_streams.h.

◆ PHP_STREAM_FCLOSE_FOPENCOOKIE

#define PHP_STREAM_FCLOSE_FOPENCOOKIE   2

Definition at line 256 of file php_streams.h.

◆ PHP_STREAM_FCLOSE_NONE

#define PHP_STREAM_FCLOSE_NONE   0

Definition at line 254 of file php_streams.h.

◆ php_stream_fill_read_buffer

#define php_stream_fill_read_buffer ( stream,
size )
Value:
new_type size
Definition ffi.c:4365
PHPAPI zend_result _php_stream_fill_read_buffer(php_stream *stream, size_t size)
Definition streams.c:541

Definition at line 331 of file php_streams.h.

◆ PHP_STREAM_FLAG_AVOID_BLOCKING

#define PHP_STREAM_FLAG_AVOID_BLOCKING   0x10

Definition at line 177 of file php_streams.h.

◆ PHP_STREAM_FLAG_DETECT_EOL

#define PHP_STREAM_FLAG_DETECT_EOL   0x4

Definition at line 170 of file php_streams.h.

◆ PHP_STREAM_FLAG_EOL_MAC

#define PHP_STREAM_FLAG_EOL_MAC   0x8

Definition at line 171 of file php_streams.h.

◆ PHP_STREAM_FLAG_EOL_UNIX

#define PHP_STREAM_FLAG_EOL_UNIX   0x0 /* also includes DOS */

Definition at line 169 of file php_streams.h.

◆ PHP_STREAM_FLAG_IS_DIR

#define PHP_STREAM_FLAG_IS_DIR   0x40

Definition at line 181 of file php_streams.h.

◆ PHP_STREAM_FLAG_NO_BUFFER

#define PHP_STREAM_FLAG_NO_BUFFER   0x2

Definition at line 167 of file php_streams.h.

◆ PHP_STREAM_FLAG_NO_CLOSE

#define PHP_STREAM_FLAG_NO_CLOSE   0x20

Definition at line 179 of file php_streams.h.

◆ PHP_STREAM_FLAG_NO_FCLOSE

#define PHP_STREAM_FLAG_NO_FCLOSE   0x80

Definition at line 183 of file php_streams.h.

◆ PHP_STREAM_FLAG_NO_IO

#define PHP_STREAM_FLAG_NO_IO   0x400

Definition at line 192 of file php_streams.h.

◆ PHP_STREAM_FLAG_NO_RSCR_DTOR_CLOSE

#define PHP_STREAM_FLAG_NO_RSCR_DTOR_CLOSE   0x200

Definition at line 190 of file php_streams.h.

◆ PHP_STREAM_FLAG_NO_SEEK

#define PHP_STREAM_FLAG_NO_SEEK   0x1

Definition at line 166 of file php_streams.h.

◆ PHP_STREAM_FLAG_SUPPRESS_ERRORS

#define PHP_STREAM_FLAG_SUPPRESS_ERRORS   0x100

Definition at line 187 of file php_streams.h.

◆ PHP_STREAM_FLAG_WAS_WRITTEN

#define PHP_STREAM_FLAG_WAS_WRITTEN   0x80000000

Definition at line 194 of file php_streams.h.

◆ php_stream_flush

#define php_stream_flush ( stream)
Value:
_php_stream_flush((stream), 0)
PHPAPI int _php_stream_flush(php_stream *stream, int closing)
Definition streams.c:1271

Definition at line 348 of file php_streams.h.

◆ php_stream_fopen_from_fd_rel

#define php_stream_fopen_from_fd_rel ( fd,
mode,
persistent_id,
zero_position )
Value:
_php_stream_fopen_from_fd((fd), (mode), (persistent_id), (zero_position) STREAMS_REL_CC)
PHPAPI php_stream * _php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id, bool zero_position STREAMS_DC)
int fd
Definition phpdbg.h:282

Definition at line 68 of file php_streams.h.

◆ php_stream_fopen_from_file_rel

#define php_stream_fopen_from_file_rel ( file,
mode )
Value:
file(string $filename, int $flags=0, $context=null)
PHPAPI php_stream * _php_stream_fopen_from_file(FILE *file, const char *mode STREAMS_DC)

Definition at line 69 of file php_streams.h.

◆ php_stream_fopen_from_pipe_rel

#define php_stream_fopen_from_pipe_rel ( file,
mode )
Value:
PHPAPI php_stream * _php_stream_fopen_from_pipe(FILE *file, const char *mode STREAMS_DC)

Definition at line 71 of file php_streams.h.

◆ php_stream_fopen_rel

#define php_stream_fopen_rel ( filename,
mode,
opened,
options )
Value:
_php_stream_fopen((filename), (mode), (opened), (options) STREAMS_REL_CC)
PHP_JSON_API size_t int options
Definition php_json.h:102
PHPAPI php_stream * _php_stream_fopen(const char *filename, const char *mode, zend_string **opened_path, int options STREAMS_DC)

Definition at line 64 of file php_streams.h.

◆ php_stream_fopen_temporary_file_rel

#define php_stream_fopen_temporary_file_rel ( dir,
pfx,
opened_path )
Value:
dir(string $directory, $context=null)
PHPAPI php_stream * _php_stream_fopen_temporary_file(const char *dir, const char *pfx, zend_string **opened_path STREAMS_DC)

Definition at line 75 of file php_streams.h.

◆ php_stream_fopen_tmpfile_rel

#define php_stream_fopen_tmpfile_rel ( )
Value:
PHPAPI php_stream * _php_stream_fopen_tmpfile(int dummy STREAMS_DC)

Definition at line 73 of file php_streams.h.

◆ php_stream_fopen_with_path_rel

#define php_stream_fopen_with_path_rel ( filename,
mode,
path,
opened,
options )
Value:
_php_stream_fopen_with_path((filename), (mode), (path), (opened), (options) STREAMS_REL_CC)
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 66 of file php_streams.h.

◆ PHP_STREAM_FORCE_CONVERSION

#define PHP_STREAM_FORCE_CONVERSION   2

Definition at line 609 of file php_streams.h.

◆ php_stream_free

#define php_stream_free ( stream,
close_options )
Value:
_php_stream_free((stream), (close_options))

Definition at line 310 of file php_streams.h.

◆ PHP_STREAM_FREE_CALL_DTOR

#define PHP_STREAM_FREE_CALL_DTOR   1 /* call ops->close */

Definition at line 298 of file php_streams.h.

◆ PHP_STREAM_FREE_CLOSE

Definition at line 305 of file php_streams.h.

◆ PHP_STREAM_FREE_CLOSE_CASTED

#define PHP_STREAM_FREE_CLOSE_CASTED   (PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_PRESERVE_HANDLE)

Definition at line 306 of file php_streams.h.

◆ PHP_STREAM_FREE_CLOSE_PERSISTENT

#define PHP_STREAM_FREE_CLOSE_PERSISTENT   (PHP_STREAM_FREE_CLOSE | PHP_STREAM_FREE_PERSISTENT)

Definition at line 307 of file php_streams.h.

◆ php_stream_free_enclosed

#define php_stream_free_enclosed ( stream_enclosed,
close_options )
Value:
_php_stream_free_enclosed((stream_enclosed), (close_options))
PHPAPI int _php_stream_free_enclosed(php_stream *stream_enclosed, int close_options)
Definition streams.c:330

Definition at line 290 of file php_streams.h.

◆ PHP_STREAM_FREE_IGNORE_ENCLOSING

#define PHP_STREAM_FREE_IGNORE_ENCLOSING   32 /* don't close the enclosing stream instead */

Definition at line 303 of file php_streams.h.

◆ PHP_STREAM_FREE_KEEP_RSRC

#define PHP_STREAM_FREE_KEEP_RSRC   64 /* keep associated zend_resource */

Definition at line 304 of file php_streams.h.

◆ PHP_STREAM_FREE_PERSISTENT

#define PHP_STREAM_FREE_PERSISTENT   16 /* manually freeing a persistent connection */

Definition at line 302 of file php_streams.h.

◆ PHP_STREAM_FREE_PRESERVE_HANDLE

#define PHP_STREAM_FREE_PRESERVE_HANDLE   4 /* tell ops->close to not close its underlying handle */

Definition at line 300 of file php_streams.h.

◆ PHP_STREAM_FREE_RELEASE_STREAM

#define PHP_STREAM_FREE_RELEASE_STREAM   2 /* pefree(stream) */

Definition at line 299 of file php_streams.h.

◆ PHP_STREAM_FREE_RSRC_DTOR

#define PHP_STREAM_FREE_RSRC_DTOR   8 /* called from the resource list dtor */

Definition at line 301 of file php_streams.h.

◆ php_stream_from_res

#define php_stream_from_res ( xstr,
res )
Value:
do { \
if (((xstr) = (php_stream*)zend_fetch_resource2((res), \
"stream", php_file_le_stream(), php_file_le_pstream())) == NULL) { \
return; \
} \
} while (0)
zend_string * res
Definition ffi.c:4692
struct _php_stream php_stream
Definition php_streams.h:96
PHPAPI int php_file_le_pstream(void)
Definition streams.c:47
PHPAPI int php_file_le_stream(void)
Definition streams.c:42
ZEND_API void * zend_fetch_resource2(zend_resource *res, const char *resource_type_name, int resource_type1, int resource_type2)
Definition zend_list.c:96

Definition at line 279 of file php_streams.h.

◆ php_stream_from_res_no_verify

#define php_stream_from_res_no_verify ( xstr,
pzval )
Value:

Definition at line 285 of file php_streams.h.

◆ php_stream_from_zval

#define php_stream_from_zval ( xstr,
pzval )
Value:
do { \
if (((xstr) = (php_stream*)zend_fetch_resource2_ex((pzval), \
"stream", php_file_le_stream(), php_file_le_pstream())) == NULL) { \
return; \
} \
} while (0)
ZEND_API void * zend_fetch_resource2_ex(zval *res, const char *resource_type_name, int resource_type1, int resource_type2)
Definition zend_list.c:153

Definition at line 273 of file php_streams.h.

◆ php_stream_from_zval_no_verify

#define php_stream_from_zval_no_verify ( xstr,
pzval )
Value:

Definition at line 286 of file php_streams.h.

◆ php_stream_get_line

#define php_stream_get_line ( stream,
buf,
maxlen,
retlen )
Value:
_php_stream_get_line((stream), (buf), (maxlen), (retlen))
PHPAPI char * _php_stream_get_line(php_stream *stream, char *buf, size_t maxlen, size_t *returned_len)
Definition streams.c:921

Definition at line 356 of file php_streams.h.

◆ php_stream_get_resource_id

#define php_stream_get_resource_id ( stream)
Value:
((php_stream *)(stream))->res->handle

Definition at line 265 of file php_streams.h.

◆ php_stream_get_url_stream_wrappers_hash

#define php_stream_get_url_stream_wrappers_hash ( )
Value:
PHPAPI HashTable * _php_stream_get_url_stream_wrappers_hash(void)
Definition streams.c:57

Definition at line 616 of file php_streams.h.

◆ php_stream_getc

#define php_stream_getc ( stream)
Value:
PHPAPI int _php_stream_getc(php_stream *stream)
Definition streams.c:837

Definition at line 342 of file php_streams.h.

◆ php_stream_gets

#define php_stream_gets ( stream,
buf,
maxlen )
Value:

Definition at line 354 of file php_streams.h.

◆ php_stream_is

#define php_stream_is ( stream,
anops )
Value:
((stream)->ops == anops)

Definition at line 526 of file php_streams.h.

◆ php_stream_is_persistent

#define php_stream_is_persistent ( stream)
Value:
(stream)->is_persistent

Definition at line 529 of file php_streams.h.

◆ PHP_STREAM_IS_STDIO

#define PHP_STREAM_IS_STDIO   &php_stream_stdio_ops

Definition at line 527 of file php_streams.h.

◆ PHP_STREAM_IS_URL

#define PHP_STREAM_IS_URL   1

Definition at line 640 of file php_streams.h.

◆ php_stream_lock

#define php_stream_lock ( stream,
mode )
Value:
PHPAPI int _php_stream_set_option(php_stream *stream, int option, int value, void *ptrparam)
Definition streams.c:1433
#define PHP_STREAM_OPTION_LOCKING

Definition at line 433 of file php_streams.h.

◆ PHP_STREAM_LOCK_SUPPORTED

#define PHP_STREAM_LOCK_SUPPORTED   1

Definition at line 430 of file php_streams.h.

◆ php_stream_make_seekable

#define php_stream_make_seekable ( origstream,
newstream,
flags )
Value:
_php_stream_make_seekable((origstream), (newstream), (flags) STREAMS_CC)
PHPAPI int _php_stream_make_seekable(php_stream *origstream, php_stream **newstream, int flags STREAMS_DC)
Definition cast.c:373

Definition at line 612 of file php_streams.h.

◆ php_stream_make_seekable_rel

#define php_stream_make_seekable_rel ( origstream,
newstream,
flags )
Value:
_php_stream_make_seekable((origstream), (newstream), (flags) STREAMS_REL_CC)

Definition at line 80 of file php_streams.h.

◆ PHP_STREAM_META_ACCESS

#define PHP_STREAM_META_ACCESS   6

Definition at line 649 of file php_streams.h.

◆ PHP_STREAM_META_GROUP

#define PHP_STREAM_META_GROUP   5

Definition at line 648 of file php_streams.h.

◆ PHP_STREAM_META_GROUP_NAME

#define PHP_STREAM_META_GROUP_NAME   4

Definition at line 647 of file php_streams.h.

◆ PHP_STREAM_META_OWNER

#define PHP_STREAM_META_OWNER   3

Definition at line 646 of file php_streams.h.

◆ PHP_STREAM_META_OWNER_NAME

#define PHP_STREAM_META_OWNER_NAME   2

Definition at line 645 of file php_streams.h.

◆ PHP_STREAM_META_TOUCH

#define PHP_STREAM_META_TOUCH   1

Definition at line 644 of file php_streams.h.

◆ php_stream_mkdir

#define php_stream_mkdir ( path,
mode,
options,
context )
Value:
PHPAPI int _php_stream_mkdir(const char *path, int mode, int options, php_stream_context *context)
Definition streams.c:2094
Definition dce.c:49

Definition at line 371 of file php_streams.h.

◆ PHP_STREAM_MKDIR_RECURSIVE

#define PHP_STREAM_MKDIR_RECURSIVE   1

Definition at line 399 of file php_streams.h.

◆ PHP_STREAM_NO_PREFERENCE

#define PHP_STREAM_NO_PREFERENCE   0

Definition at line 607 of file php_streams.h.

◆ php_stream_open_wrapper

#define php_stream_open_wrapper ( path,
mode,
options,
opened )
Value:
PHPAPI php_stream * _php_stream_open_wrapper_ex(const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC)
Definition streams.c:2187

Definition at line 597 of file php_streams.h.

◆ php_stream_open_wrapper_ex

#define php_stream_open_wrapper_ex ( path,
mode,
options,
opened,
context )
Value:

Definition at line 598 of file php_streams.h.

◆ php_stream_open_wrapper_ex_rel

#define php_stream_open_wrapper_ex_rel ( path,
mode,
options,
opened,
context )
Value:

Definition at line 78 of file php_streams.h.

◆ php_stream_open_wrapper_rel

#define php_stream_open_wrapper_rel ( path,
mode,
options,
opened )
Value:

Definition at line 77 of file php_streams.h.

◆ php_stream_opendir

#define php_stream_opendir ( path,
options,
context )
Value:
PHPAPI php_stream * _php_stream_opendir(const char *path, int options, php_stream_context *context STREAMS_DC)
Definition streams.c:2138

Definition at line 377 of file php_streams.h.

◆ PHP_STREAM_OPTION_BLOCKING

#define PHP_STREAM_OPTION_BLOCKING   1

Definition at line 411 of file php_streams.h.

◆ PHP_STREAM_OPTION_CHECK_LIVENESS

#define PHP_STREAM_OPTION_CHECK_LIVENESS   12 /* no parameters */

Definition at line 456 of file php_streams.h.

◆ PHP_STREAM_OPTION_CRYPTO_API

#define PHP_STREAM_OPTION_CRYPTO_API   8 /* see php_stream_transport.h */

Definition at line 437 of file php_streams.h.

◆ PHP_STREAM_OPTION_LOCKING

#define PHP_STREAM_OPTION_LOCKING   6

Definition at line 427 of file php_streams.h.

◆ PHP_STREAM_OPTION_META_DATA_API

#define PHP_STREAM_OPTION_META_DATA_API   11 /* ptrparam is a zval* to which to add metadata information */

Definition at line 451 of file php_streams.h.

◆ PHP_STREAM_OPTION_MMAP_API

#define PHP_STREAM_OPTION_MMAP_API   9 /* see php_stream_mmap.h */

Definition at line 438 of file php_streams.h.

◆ PHP_STREAM_OPTION_PIPE_BLOCKING

#define PHP_STREAM_OPTION_PIPE_BLOCKING   13

Definition at line 459 of file php_streams.h.

◆ PHP_STREAM_OPTION_READ_BUFFER

#define PHP_STREAM_OPTION_READ_BUFFER   2

Definition at line 415 of file php_streams.h.

◆ PHP_STREAM_OPTION_READ_TIMEOUT

#define PHP_STREAM_OPTION_READ_TIMEOUT   4

Definition at line 423 of file php_streams.h.

◆ PHP_STREAM_OPTION_RETURN_ERR

#define PHP_STREAM_OPTION_RETURN_ERR   -1 /* problem setting option */

Definition at line 471 of file php_streams.h.

◆ PHP_STREAM_OPTION_RETURN_NOTIMPL

#define PHP_STREAM_OPTION_RETURN_NOTIMPL   -2 /* underlying stream does not implement; streams can handle it instead */

Definition at line 472 of file php_streams.h.

◆ PHP_STREAM_OPTION_RETURN_OK

#define PHP_STREAM_OPTION_RETURN_OK   0 /* option set OK */

Definition at line 470 of file php_streams.h.

◆ PHP_STREAM_OPTION_SET_CHUNK_SIZE

#define PHP_STREAM_OPTION_SET_CHUNK_SIZE   5

Definition at line 424 of file php_streams.h.

◆ PHP_STREAM_OPTION_SYNC_API

#define PHP_STREAM_OPTION_SYNC_API   14

Definition at line 462 of file php_streams.h.

◆ PHP_STREAM_OPTION_TRUNCATE_API

#define PHP_STREAM_OPTION_TRUNCATE_API   10

Definition at line 439 of file php_streams.h.

◆ PHP_STREAM_OPTION_WRITE_BUFFER

#define PHP_STREAM_OPTION_WRITE_BUFFER   3

Definition at line 416 of file php_streams.h.

◆ PHP_STREAM_OPTION_XPORT_API

#define PHP_STREAM_OPTION_XPORT_API   7 /* see php_stream_transport.h */

Definition at line 436 of file php_streams.h.

◆ php_stream_passthru

#define php_stream_passthru ( stream)
Value:
PHPAPI ssize_t _php_stream_passthru(php_stream *src STREAMS_DC)

Definition at line 493 of file php_streams.h.

◆ php_stream_pclose

#define php_stream_pclose ( stream)
Value:
#define PHP_STREAM_FREE_CLOSE_PERSISTENT

Definition at line 312 of file php_streams.h.

◆ PHP_STREAM_PERSISTENT_FAILURE

#define PHP_STREAM_PERSISTENT_FAILURE   1 /* id exists but is not a stream! */

Definition at line 295 of file php_streams.h.

◆ PHP_STREAM_PERSISTENT_NOT_EXIST

#define PHP_STREAM_PERSISTENT_NOT_EXIST   2 /* id does not exist */

Definition at line 296 of file php_streams.h.

◆ PHP_STREAM_PERSISTENT_SUCCESS

#define PHP_STREAM_PERSISTENT_SUCCESS   0 /* id exists */

Definition at line 294 of file php_streams.h.

◆ php_stream_populate_meta_data

#define php_stream_populate_meta_data ( stream,
zv )
Value:
zval * zv
Definition ffi.c:3975
#define PHP_STREAM_OPTION_META_DATA_API
#define PHP_STREAM_OPTION_RETURN_OK

Definition at line 452 of file php_streams.h.

◆ PHP_STREAM_PREFER_STDIO

#define PHP_STREAM_PREFER_STDIO   1

Definition at line 608 of file php_streams.h.

◆ php_stream_printf

#define php_stream_printf   _php_stream_printf

Definition at line 336 of file php_streams.h.

◆ php_stream_putc

#define php_stream_putc ( stream,
c )
Value:
_php_stream_putc((stream), (c))
PHPAPI int _php_stream_putc(php_stream *stream, int c)
Definition streams.c:827

Definition at line 345 of file php_streams.h.

◆ php_stream_puts

#define php_stream_puts ( stream,
buf )
Value:
_php_stream_puts((stream), (buf))
PHPAPI bool _php_stream_puts(php_stream *stream, const char *buf)
Definition streams.c:847

Definition at line 361 of file php_streams.h.

◆ php_stream_read

#define php_stream_read ( stream,
buf,
count )
Value:
_php_stream_read((stream), (buf), (count))
count(Countable|array $value, int $mode=COUNT_NORMAL)
PHPAPI ssize_t _php_stream_read(php_stream *stream, char *buf, size_t count)
Definition streams.c:706

Definition at line 322 of file php_streams.h.

◆ php_stream_readdir

#define php_stream_readdir ( dirstream,
dirent )
Value:
_php_stream_readdir((dirstream), (dirent))
PHPAPI php_stream_dirent * _php_stream_readdir(php_stream *dirstream, php_stream_dirent *ent)
Definition streams.c:2175

Definition at line 379 of file php_streams.h.

◆ PHP_STREAM_RELEASED

#define PHP_STREAM_RELEASED   1 /* newstream should be used; origstream is no longer valid */

Definition at line 604 of file php_streams.h.

◆ php_stream_rewind

#define php_stream_rewind ( stream)
Value:
_php_stream_seek((stream), 0L, SEEK_SET)
#define SEEK_SET
Definition gd_io_file.c:20
PHPAPI int _php_stream_seek(php_stream *stream, zend_off_t offset, int whence)
Definition streams.c:1340

Definition at line 315 of file php_streams.h.

◆ php_stream_rewinddir

#define php_stream_rewinddir ( dirstream)
Value:
php_stream_rewind((dirstream))
#define php_stream_rewind(stream)

Definition at line 381 of file php_streams.h.

◆ php_stream_rmdir

#define php_stream_rmdir ( path,
options,
context )
Value:
PHPAPI int _php_stream_rmdir(const char *path, int options, php_stream_context *context)
Definition streams.c:2108

Definition at line 374 of file php_streams.h.

◆ php_stream_scandir

#define php_stream_scandir ( dirname,
namelist,
context,
compare )
Value:
_php_stream_scandir((dirname), (namelist), 0, (context), (compare))
dirname(string $path, int $levels=1)
PHPAPI int _php_stream_scandir(const char *dirname, zend_string **namelist[], int flags, php_stream_context *context, int(*compare)(const zend_string **a, const zend_string **b))
Definition streams.c:2452

Definition at line 388 of file php_streams.h.

◆ php_stream_seek

#define php_stream_seek ( stream,
offset,
whence )
Value:
_php_stream_seek((stream), (offset), (whence))
zend_long offset

Definition at line 316 of file php_streams.h.

◆ php_stream_set_chunk_size

#define php_stream_set_chunk_size ( stream,
size )
Value:

Definition at line 393 of file php_streams.h.

◆ php_stream_set_option

#define php_stream_set_option ( stream,
option,
value,
ptrvalue )
Value:
_php_stream_set_option((stream), (option), (value), (ptrvalue))
value

Definition at line 391 of file php_streams.h.

◆ php_stream_stat

#define php_stream_stat ( stream,
ssb )
Value:
_php_stream_stat((stream), (ssb))
PHPAPI int _php_stream_stat(php_stream *stream, php_stream_statbuf *ssb)
Definition streams.c:859

Definition at line 364 of file php_streams.h.

◆ php_stream_stat_path

#define php_stream_stat_path ( path,
ssb )
Value:
_php_stream_stat_path((path), 0, (ssb), NULL)
PHPAPI int _php_stream_stat_path(const char *path, int flags, php_stream_statbuf *ssb, php_stream_context *context)
Definition streams.c:2122

Definition at line 367 of file php_streams.h.

◆ php_stream_stat_path_ex

#define php_stream_stat_path_ex ( path,
flags,
ssb,
context )
Value:
_php_stream_stat_path((path), (flags), (ssb), (context))

Definition at line 368 of file php_streams.h.

◆ php_stream_supports_lock

#define php_stream_supports_lock ( stream)
Value:
#define PHP_STREAM_LOCK_SUPPORTED

Definition at line 432 of file php_streams.h.

◆ php_stream_sync

#define php_stream_sync ( stream,
d )
Value:
_php_stream_sync((stream), (d))
PHPAPI int _php_stream_sync(php_stream *stream, bool data_only)
Definition streams.c:1467

Definition at line 351 of file php_streams.h.

◆ PHP_STREAM_SYNC_FDSYNC

#define PHP_STREAM_SYNC_FDSYNC   2

Definition at line 465 of file php_streams.h.

◆ PHP_STREAM_SYNC_FSYNC

#define PHP_STREAM_SYNC_FSYNC   1

Definition at line 464 of file php_streams.h.

◆ PHP_STREAM_SYNC_SUPPORTED

#define PHP_STREAM_SYNC_SUPPORTED   0

Definition at line 463 of file php_streams.h.

◆ php_stream_sync_supported

#define php_stream_sync_supported ( stream)
Value:

Definition at line 467 of file php_streams.h.

◆ php_stream_tell

#define php_stream_tell ( stream)
Value:
PHPAPI zend_off_t _php_stream_tell(php_stream *stream)
Definition streams.c:1335

Definition at line 319 of file php_streams.h.

◆ php_stream_to_zval

#define php_stream_to_zval ( stream,
zval )
Value:
{ ZVAL_RES(zval, (stream)->res); (stream)->__exposed = 1; }
struct _zval_struct zval
#define ZVAL_RES(z, r)

Definition at line 271 of file php_streams.h.

◆ PHP_STREAM_TRUNCATE_SET_SIZE

#define PHP_STREAM_TRUNCATE_SET_SIZE   1 /* ptrparam is a pointer to a size_t */

Definition at line 442 of file php_streams.h.

◆ php_stream_truncate_set_size

#define php_stream_truncate_set_size ( stream,
size )
Value:
PHPAPI int _php_stream_truncate_set_size(php_stream *stream, size_t newsize)
Definition streams.c:1476

Definition at line 448 of file php_streams.h.

◆ PHP_STREAM_TRUNCATE_SUPPORTED

#define PHP_STREAM_TRUNCATE_SUPPORTED   0

Definition at line 441 of file php_streams.h.

◆ php_stream_truncate_supported

#define php_stream_truncate_supported ( stream)
Value:

Definition at line 444 of file php_streams.h.

◆ PHP_STREAM_UNCHANGED

#define PHP_STREAM_UNCHANGED   0 /* orig stream was seekable anyway */

Definition at line 603 of file php_streams.h.

◆ PHP_STREAM_URL_STAT_IGNORE_OPEN_BASEDIR

#define PHP_STREAM_URL_STAT_IGNORE_OPEN_BASEDIR   4

Definition at line 408 of file php_streams.h.

◆ PHP_STREAM_URL_STAT_LINK

#define PHP_STREAM_URL_STAT_LINK   1

Definition at line 406 of file php_streams.h.

◆ PHP_STREAM_URL_STAT_QUIET

#define PHP_STREAM_URL_STAT_QUIET   2

Definition at line 407 of file php_streams.h.

◆ php_stream_write

#define php_stream_write ( stream,
buf,
count )
Value:
PHPAPI ssize_t _php_stream_write(php_stream *stream, const char *buf, size_t count)
Definition streams.c:1288

Definition at line 328 of file php_streams.h.

◆ php_stream_write_string

#define php_stream_write_string ( stream,
str )
Value:
_php_stream_write(stream, str, strlen(str))
strlen(string $string)

Definition at line 327 of file php_streams.h.

◆ REPORT_ERRORS

#define REPORT_ERRORS   0x00000008

Definition at line 536 of file php_streams.h.

◆ STREAM_ASSUME_REALPATH

#define STREAM_ASSUME_REALPATH   0x00004000

Definition at line 575 of file php_streams.h.

◆ STREAM_DISABLE_OPEN_BASEDIR

#define STREAM_DISABLE_OPEN_BASEDIR   0x00000400

Definition at line 563 of file php_streams.h.

◆ STREAM_DISABLE_URL_PROTECTION

#define STREAM_DISABLE_URL_PROTECTION   0x00002000

Definition at line 572 of file php_streams.h.

◆ STREAM_LOCATE_WRAPPERS_ONLY

#define STREAM_LOCATE_WRAPPERS_ONLY   0x00000040

Definition at line 551 of file php_streams.h.

◆ STREAM_MUST_SEEK

#define STREAM_MUST_SEEK   0x00000010

Definition at line 540 of file php_streams.h.

◆ STREAM_ONLY_GET_HEADERS

#define STREAM_ONLY_GET_HEADERS   0x00000200

Definition at line 560 of file php_streams.h.

◆ STREAM_OPEN_FOR_INCLUDE

#define STREAM_OPEN_FOR_INCLUDE   0x00000080

Definition at line 554 of file php_streams.h.

◆ STREAM_OPEN_FOR_ZEND_STREAM

#define STREAM_OPEN_FOR_ZEND_STREAM   0x00010000

Definition at line 581 of file php_streams.h.

◆ STREAM_OPEN_PERSISTENT

#define STREAM_OPEN_PERSISTENT   0x00000800

Definition at line 566 of file php_streams.h.

◆ STREAM_USE_BLOCKING_PIPE

#define STREAM_USE_BLOCKING_PIPE   0x00008000

Definition at line 578 of file php_streams.h.

◆ STREAM_USE_GLOB_DIR_OPEN

#define STREAM_USE_GLOB_DIR_OPEN   0x00001000

Definition at line 569 of file php_streams.h.

◆ STREAM_USE_URL

#define STREAM_USE_URL   0x00000100

Definition at line 557 of file php_streams.h.

◆ STREAM_WILL_CAST

#define STREAM_WILL_CAST   0x00000020

Definition at line 548 of file php_streams.h.

◆ STREAMS_C

#define STREAMS_C

Definition at line 51 of file php_streams.h.

◆ STREAMS_CC

#define STREAMS_CC

Definition at line 54 of file php_streams.h.

◆ STREAMS_D

#define STREAMS_D

Definition at line 50 of file php_streams.h.

◆ STREAMS_DC

#define STREAMS_DC

Definition at line 53 of file php_streams.h.

◆ STREAMS_REL_C

#define STREAMS_REL_C

Definition at line 52 of file php_streams.h.

◆ STREAMS_REL_CC

#define STREAMS_REL_CC

Definition at line 55 of file php_streams.h.

◆ USE_PATH

#define USE_PATH   0x00000001

Definition at line 534 of file php_streams.h.

Typedef Documentation

◆ php_stream

typedef struct _php_stream php_stream

Definition at line 96 of file php_streams.h.

◆ php_stream_context

Definition at line 98 of file php_streams.h.

◆ php_stream_dirent

◆ php_stream_filter

Definition at line 99 of file php_streams.h.

◆ php_stream_ops

◆ php_stream_statbuf

◆ php_stream_wrapper

Definition at line 97 of file php_streams.h.

◆ php_stream_wrapper_ops

Function Documentation

◆ _php_get_stream_filters_hash()

PHPAPI HashTable * _php_get_stream_filters_hash ( void )

Definition at line 37 of file filter.c.

◆ _php_stream_alloc()

PHPAPI php_stream * _php_stream_alloc ( const php_stream_ops * ops,
void * abstract,
const char * persistent_id,
const char *mode STREAMS_DC )

Definition at line 278 of file streams.c.

◆ _php_stream_cast()

PHPAPI int _php_stream_cast ( php_stream * stream,
int castas,
void ** ret,
int show_err )

Definition at line 194 of file cast.c.

◆ _php_stream_copy_to_mem()

PHPAPI zend_string * _php_stream_copy_to_mem ( php_stream * src,
size_t maxlen,
int persistent STREAMS_DC )

Definition at line 1520 of file streams.c.

◆ _php_stream_copy_to_stream()

ZEND_ATTRIBUTE_DEPRECATED PHPAPI size_t _php_stream_copy_to_stream ( php_stream * src,
php_stream * dest,
size_t maxlen STREAMS_DC )

Definition at line 1812 of file streams.c.

◆ _php_stream_copy_to_stream_ex()

PHPAPI zend_result _php_stream_copy_to_stream_ex ( php_stream * src,
php_stream * dest,
size_t maxlen,
size_t *len STREAMS_DC )

Definition at line 1613 of file streams.c.

◆ _php_stream_eof()

PHPAPI bool _php_stream_eof ( php_stream * stream)

Definition at line 810 of file streams.c.

◆ _php_stream_fill_read_buffer()

PHPAPI zend_result _php_stream_fill_read_buffer ( php_stream * stream,
size_t size )

Definition at line 541 of file streams.c.

◆ _php_stream_flush()

PHPAPI int _php_stream_flush ( php_stream * stream,
int closing )

Definition at line 1271 of file streams.c.

◆ _php_stream_free()

PHPAPI int _php_stream_free ( php_stream * stream,
int close_options )

Definition at line 365 of file streams.c.

◆ _php_stream_free_enclosed()

PHPAPI int _php_stream_free_enclosed ( php_stream * stream_enclosed,
int close_options )

Definition at line 330 of file streams.c.

◆ _php_stream_get_line()

PHPAPI char * _php_stream_get_line ( php_stream * stream,
char * buf,
size_t maxlen,
size_t * returned_len )

Definition at line 921 of file streams.c.

◆ _php_stream_get_url_stream_wrappers_hash()

PHPAPI HashTable * _php_stream_get_url_stream_wrappers_hash ( void )

Definition at line 57 of file streams.c.

◆ _php_stream_getc()

PHPAPI int _php_stream_getc ( php_stream * stream)

Definition at line 837 of file streams.c.

◆ _php_stream_make_seekable()

PHPAPI int _php_stream_make_seekable ( php_stream * origstream,
php_stream ** newstream,
int flags STREAMS_DC )

Definition at line 373 of file cast.c.

◆ _php_stream_mkdir()

PHPAPI int _php_stream_mkdir ( const char * path,
int mode,
int options,
php_stream_context * context )

Definition at line 2094 of file streams.c.

◆ _php_stream_open_wrapper_ex()

PHPAPI php_stream * _php_stream_open_wrapper_ex ( const char * path,
const char * mode,
int options,
zend_string ** opened_path,
php_stream_context *context STREAMS_DC )

Definition at line 2187 of file streams.c.

◆ _php_stream_opendir()

PHPAPI php_stream * _php_stream_opendir ( const char * path,
int options,
php_stream_context *context STREAMS_DC )

Definition at line 2138 of file streams.c.

◆ _php_stream_passthru()

PHPAPI ssize_t _php_stream_passthru ( php_stream *src STREAMS_DC)

◆ _php_stream_printf()

PHPAPI ssize_t _php_stream_printf ( php_stream * stream,
const char * fmt,
... )

◆ _php_stream_putc()

PHPAPI int _php_stream_putc ( php_stream * stream,
int c )

Definition at line 827 of file streams.c.

◆ _php_stream_puts()

PHPAPI bool _php_stream_puts ( php_stream * stream,
const char * buf )

Definition at line 847 of file streams.c.

◆ _php_stream_read()

PHPAPI ssize_t _php_stream_read ( php_stream * stream,
char * buf,
size_t count )

Definition at line 706 of file streams.c.

◆ _php_stream_readdir()

PHPAPI php_stream_dirent * _php_stream_readdir ( php_stream * dirstream,
php_stream_dirent * ent )

Definition at line 2175 of file streams.c.

◆ _php_stream_rmdir()

PHPAPI int _php_stream_rmdir ( const char * path,
int options,
php_stream_context * context )

Definition at line 2108 of file streams.c.

◆ _php_stream_scandir()

PHPAPI int _php_stream_scandir ( const char * dirname,
zend_string ** namelist[],
int flags,
php_stream_context * context,
int(* compare )(const zend_string **a, const zend_string **b) )

Definition at line 2452 of file streams.c.

◆ _php_stream_seek()

PHPAPI int _php_stream_seek ( php_stream * stream,
zend_off_t offset,
int whence )

Definition at line 1340 of file streams.c.

◆ _php_stream_set_option()

PHPAPI int _php_stream_set_option ( php_stream * stream,
int option,
int value,
void * ptrparam )

Definition at line 1433 of file streams.c.

◆ _php_stream_stat()

PHPAPI int _php_stream_stat ( php_stream * stream,
php_stream_statbuf * ssb )

Definition at line 859 of file streams.c.

◆ _php_stream_stat_path()

PHPAPI int _php_stream_stat_path ( const char * path,
int flags,
php_stream_statbuf * ssb,
php_stream_context * context )

Definition at line 2122 of file streams.c.

◆ _php_stream_sync()

PHPAPI int _php_stream_sync ( php_stream * stream,
bool data_only )

Definition at line 1467 of file streams.c.

◆ _php_stream_tell()

PHPAPI zend_off_t _php_stream_tell ( php_stream * stream)

Definition at line 1335 of file streams.c.

◆ _php_stream_truncate_set_size()

PHPAPI int _php_stream_truncate_set_size ( php_stream * stream,
size_t newsize )

Definition at line 1476 of file streams.c.

◆ _php_stream_write()

PHPAPI ssize_t _php_stream_write ( php_stream * stream,
const char * buf,
size_t count )

Definition at line 1288 of file streams.c.

◆ php_file_le_pstream()

PHPAPI int php_file_le_pstream ( void )

Definition at line 47 of file streams.c.

◆ php_file_le_stream()

PHPAPI int php_file_le_stream ( void )

Definition at line 42 of file streams.c.

◆ php_file_le_stream_filter()

PHPAPI int php_file_le_stream_filter ( void )

Definition at line 52 of file streams.c.

◆ php_get_stream_filters_hash_global()

PHPAPI HashTable * php_get_stream_filters_hash_global ( void )

Definition at line 31 of file filter.c.

◆ php_init_stream_wrappers()

int php_init_stream_wrappers ( int module_number)

Definition at line 1860 of file streams.c.

◆ php_register_url_stream_wrapper()

PHPAPI zend_result php_register_url_stream_wrapper ( const char * protocol,
const php_stream_wrapper * wrapper )

Definition at line 1911 of file streams.c.

◆ php_register_url_stream_wrapper_volatile()

PHPAPI zend_result php_register_url_stream_wrapper_volatile ( zend_string * protocol,
php_stream_wrapper * wrapper )

Definition at line 1940 of file streams.c.

◆ PHP_RSHUTDOWN_FUNCTION()

PHP_RSHUTDOWN_FUNCTION ( streams )

Definition at line 92 of file streams.c.

◆ php_shutdown_stream_hashes()

void php_shutdown_stream_hashes ( void )

Definition at line 1838 of file streams.c.

◆ php_shutdown_stream_wrappers()

void php_shutdown_stream_wrappers ( int module_number)

Definition at line 1884 of file streams.c.

◆ php_stream_dirent_alphasort()

PHPAPI int php_stream_dirent_alphasort ( const zend_string ** a,
const zend_string ** b )

Definition at line 2438 of file streams.c.

◆ php_stream_dirent_alphasortr()

PHPAPI int php_stream_dirent_alphasortr ( const zend_string ** a,
const zend_string ** b )

Definition at line 2445 of file streams.c.

◆ php_stream_encloses()

PHPAPI php_stream * php_stream_encloses ( php_stream * enclosing,
php_stream * enclosed )

Definition at line 102 of file streams.c.

◆ php_stream_from_persistent_id()

PHPAPI int php_stream_from_persistent_id ( const char * persistent_id,
php_stream ** stream )

Definition at line 111 of file streams.c.

◆ php_stream_get_record()

PHPAPI zend_string * php_stream_get_record ( php_stream * stream,
size_t maxlen,
const char * delim,
size_t delim_len )

Definition at line 1062 of file streams.c.

◆ php_stream_get_url_stream_wrappers_hash_global()

PHPAPI HashTable * php_stream_get_url_stream_wrappers_hash_global ( void )

Definition at line 62 of file streams.c.

◆ php_stream_locate_eol()

PHPAPI const char * php_stream_locate_eol ( php_stream * stream,
zend_string * buf )

Definition at line 879 of file streams.c.

◆ php_stream_locate_url_wrapper()

PHPAPI php_stream_wrapper * php_stream_locate_url_wrapper ( const char * path,
const char ** path_for_open,
int options )

Definition at line 1964 of file streams.c.

◆ php_stream_read_to_str()

PHPAPI zend_string * php_stream_read_to_str ( php_stream * stream,
size_t len )

Definition at line 792 of file streams.c.

◆ php_stream_wrapper_log_error()

PHPAPI void php_stream_wrapper_log_error ( const php_stream_wrapper * wrapper,
int options,
const char * fmt,
... )

◆ php_unregister_url_stream_wrapper()

PHPAPI zend_result php_unregister_url_stream_wrapper ( const char * protocol)

Definition at line 1927 of file streams.c.

◆ php_unregister_url_stream_wrapper_volatile()

PHPAPI zend_result php_unregister_url_stream_wrapper_volatile ( zend_string * protocol)

Definition at line 1953 of file streams.c.

Variable Documentation

◆ php_stream_user_wrapper_ops

const php_stream_wrapper_ops* php_stream_user_wrapper_ops
extern