php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
userspace.c File Reference
#include "php.h"
#include "php_globals.h"
#include "ext/standard/file.h"
#include "ext/standard/flock_compat.h"
#include <stddef.h>
#include "userspace_arginfo.h"

Go to the source code of this file.

Data Structures

struct  php_user_stream_wrapper
 
struct  _php_userstream_data
 

Macros

#define USERSTREAM_OPEN   "stream_open"
 
#define USERSTREAM_CLOSE   "stream_close"
 
#define USERSTREAM_READ   "stream_read"
 
#define USERSTREAM_WRITE   "stream_write"
 
#define USERSTREAM_FLUSH   "stream_flush"
 
#define USERSTREAM_SEEK   "stream_seek"
 
#define USERSTREAM_TELL   "stream_tell"
 
#define USERSTREAM_EOF   "stream_eof"
 
#define USERSTREAM_STAT   "stream_stat"
 
#define USERSTREAM_STATURL   "url_stat"
 
#define USERSTREAM_UNLINK   "unlink"
 
#define USERSTREAM_RENAME   "rename"
 
#define USERSTREAM_MKDIR   "mkdir"
 
#define USERSTREAM_RMDIR   "rmdir"
 
#define USERSTREAM_DIR_OPEN   "dir_opendir"
 
#define USERSTREAM_DIR_READ   "dir_readdir"
 
#define USERSTREAM_DIR_REWIND   "dir_rewinddir"
 
#define USERSTREAM_DIR_CLOSE   "dir_closedir"
 
#define USERSTREAM_LOCK   "stream_lock"
 
#define USERSTREAM_CAST   "stream_cast"
 
#define USERSTREAM_SET_OPTION   "stream_set_option"
 
#define USERSTREAM_TRUNCATE   "stream_truncate"
 
#define USERSTREAM_METADATA   "stream_metadata"
 
#define STAT_PROP_ENTRY_EX(name, name2)
 
#define STAT_PROP_ENTRY(name)
 

Typedefs

typedef struct _php_userstream_data php_userstream_data_t
 

Functions

 PHP_MINIT_FUNCTION (user_streams)
 
 PHP_FUNCTION (stream_wrapper_register)
 
 PHP_FUNCTION (stream_wrapper_unregister)
 
 PHP_FUNCTION (stream_wrapper_restore)
 

Variables

const php_stream_ops php_stream_userspace_ops
 
const php_stream_ops php_stream_userspace_dir_ops
 

Macro Definition Documentation

◆ STAT_PROP_ENTRY

#define STAT_PROP_ENTRY ( name)
Value:
#define STAT_PROP_ENTRY_EX(name, name2)
zend_string * name

◆ STAT_PROP_ENTRY_EX

#define STAT_PROP_ENTRY_EX ( name,
name2 )
Value:
if (NULL != (elem = zend_hash_str_find(Z_ARRVAL_P(array), #name, sizeof(#name)-1))) { \
ssb->sb.st_##name2 = zval_get_long(elem); \
}
#define NULL
Definition gdcache.h:45
ZEND_API zval *ZEND_FASTCALL zend_hash_str_find(const HashTable *ht, const char *str, size_t len)
Definition zend_hash.c:2689
#define Z_ARRVAL_P(zval_p)
Definition zend_types.h:987

◆ USERSTREAM_CAST

#define USERSTREAM_CAST   "stream_cast"

Definition at line 117 of file userspace.c.

◆ USERSTREAM_CLOSE

#define USERSTREAM_CLOSE   "stream_close"

Definition at line 99 of file userspace.c.

◆ USERSTREAM_DIR_CLOSE

#define USERSTREAM_DIR_CLOSE   "dir_closedir"

Definition at line 115 of file userspace.c.

◆ USERSTREAM_DIR_OPEN

#define USERSTREAM_DIR_OPEN   "dir_opendir"

Definition at line 112 of file userspace.c.

◆ USERSTREAM_DIR_READ

#define USERSTREAM_DIR_READ   "dir_readdir"

Definition at line 113 of file userspace.c.

◆ USERSTREAM_DIR_REWIND

#define USERSTREAM_DIR_REWIND   "dir_rewinddir"

Definition at line 114 of file userspace.c.

◆ USERSTREAM_EOF

#define USERSTREAM_EOF   "stream_eof"

Definition at line 105 of file userspace.c.

◆ USERSTREAM_FLUSH

#define USERSTREAM_FLUSH   "stream_flush"

Definition at line 102 of file userspace.c.

◆ USERSTREAM_LOCK

#define USERSTREAM_LOCK   "stream_lock"

Definition at line 116 of file userspace.c.

◆ USERSTREAM_METADATA

#define USERSTREAM_METADATA   "stream_metadata"

Definition at line 120 of file userspace.c.

◆ USERSTREAM_MKDIR

#define USERSTREAM_MKDIR   "mkdir"

Definition at line 110 of file userspace.c.

◆ USERSTREAM_OPEN

#define USERSTREAM_OPEN   "stream_open"

Definition at line 98 of file userspace.c.

◆ USERSTREAM_READ

#define USERSTREAM_READ   "stream_read"

Definition at line 100 of file userspace.c.

◆ USERSTREAM_RENAME

#define USERSTREAM_RENAME   "rename"

Definition at line 109 of file userspace.c.

◆ USERSTREAM_RMDIR

#define USERSTREAM_RMDIR   "rmdir"

Definition at line 111 of file userspace.c.

◆ USERSTREAM_SEEK

#define USERSTREAM_SEEK   "stream_seek"

Definition at line 103 of file userspace.c.

◆ USERSTREAM_SET_OPTION

#define USERSTREAM_SET_OPTION   "stream_set_option"

Definition at line 118 of file userspace.c.

◆ USERSTREAM_STAT

#define USERSTREAM_STAT   "stream_stat"

Definition at line 106 of file userspace.c.

◆ USERSTREAM_STATURL

#define USERSTREAM_STATURL   "url_stat"

Definition at line 107 of file userspace.c.

◆ USERSTREAM_TELL

#define USERSTREAM_TELL   "stream_tell"

Definition at line 104 of file userspace.c.

◆ USERSTREAM_TRUNCATE

#define USERSTREAM_TRUNCATE   "stream_truncate"

Definition at line 119 of file userspace.c.

◆ USERSTREAM_UNLINK

#define USERSTREAM_UNLINK   "unlink"

Definition at line 108 of file userspace.c.

◆ USERSTREAM_WRITE

#define USERSTREAM_WRITE   "stream_write"

Definition at line 101 of file userspace.c.

Typedef Documentation

◆ php_userstream_data_t

Definition at line 95 of file userspace.c.

Function Documentation

◆ PHP_FUNCTION() [1/3]

PHP_FUNCTION ( stream_wrapper_register )

Definition at line 462 of file userspace.c.

◆ PHP_FUNCTION() [2/3]

PHP_FUNCTION ( stream_wrapper_restore )

Definition at line 529 of file userspace.c.

◆ PHP_FUNCTION() [3/3]

PHP_FUNCTION ( stream_wrapper_unregister )

Definition at line 502 of file userspace.c.

◆ PHP_MINIT_FUNCTION()

PHP_MINIT_FUNCTION ( user_streams )

Definition at line 80 of file userspace.c.

Variable Documentation

◆ php_stream_userspace_dir_ops

const php_stream_ops php_stream_userspace_dir_ops
Initial value:
= {
NULL,
php_userstreamop_readdir,
php_userstreamop_closedir,
NULL,
"user-space-dir",
php_userstreamop_rewinddir,
NULL,
NULL,
}

Definition at line 1455 of file userspace.c.

◆ php_stream_userspace_ops

const php_stream_ops php_stream_userspace_ops
Initial value:
= {
php_userstreamop_write, php_userstreamop_read,
php_userstreamop_close, php_userstreamop_flush,
"user-space",
php_userstreamop_seek,
php_userstreamop_cast,
php_userstreamop_stat,
php_userstreamop_set_option,
}

Definition at line 1445 of file userspace.c.