summaryrefslogtreecommitdiff
path: root/main/php_streams.h
diff options
context:
space:
mode:
authorSara Golemon <pollita@php.net>2003-12-13 04:07:18 +0000
committerSara Golemon <pollita@php.net>2003-12-13 04:07:18 +0000
commitc56647833be9f32aea9eef211c22ce5d4eb841b7 (patch)
tree2b7b3141e27adf7cababccbcb8456e10ceeff667 /main/php_streams.h
parentbef6368deed93518f1dc81168487bbed08a464b6 (diff)
downloadphp-git-c56647833be9f32aea9eef211c22ce5d4eb841b7.tar.gz
Route mkdir()/rmdir() via wrapper ops.
Move current rmdir()/rmdir() code to plain_wrappers.c Implement mkdir()/rmdir() in ftp:// wrapper
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-xmain/php_streams.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h
index f3d2ceedcb..6ba17d54cb 100755
--- a/main/php_streams.h
+++ b/main/php_streams.h
@@ -151,6 +151,10 @@ typedef struct _php_stream_wrapper_ops {
/* rename a file */
int (*rename)(php_stream_wrapper *wrapper, char *url_from, char *url_to, int options, php_stream_context *context TSRMLS_DC);
+
+ /* Create/Remove directory */
+ int (*mkdir)(php_stream_wrapper *wrapper, char *url, int mode, int options, php_stream_context *context TSRMLS_DC);
+ int (*rmdir)(php_stream_wrapper *wrapper, char *url, int options, php_stream_context *context TSRMLS_DC);
} php_stream_wrapper_ops;
struct _php_stream_wrapper {
@@ -308,6 +312,12 @@ PHPAPI int _php_stream_stat_path(char *path, int flags, php_stream_statbuf *ssb,
#define php_stream_stat_path(path, ssb) _php_stream_stat_path((path), 0, (ssb), NULL TSRMLS_CC)
#define php_stream_stat_path_ex(path, flags, ssb, context) _php_stream_stat_path((path), (flags), (ssb), (context) TSRMLS_CC)
+PHPAPI int _php_stream_mkdir(char *path, int mode, int options, php_stream_context *context TSRMLS_DC);
+#define php_stream_mkdir(path, mode, options, context) _php_stream_mkdir(path, mode, options, context TSRMLS_CC)
+
+PHPAPI int _php_stream_rmdir(char *path, int options, php_stream_context *context TSRMLS_DC);
+#define php_stream_rmdir(path, options, context) _php_stream_rmdir(path, options, context TSRMLS_CC)
+
PHPAPI php_stream *_php_stream_opendir(char *path, int options, php_stream_context *context STREAMS_DC TSRMLS_DC);
#define php_stream_opendir(path, options, context) _php_stream_opendir((path), (options), (context) STREAMS_CC TSRMLS_CC)
PHPAPI php_stream_dirent *_php_stream_readdir(php_stream *dirstream, php_stream_dirent *ent TSRMLS_DC);
@@ -320,6 +330,13 @@ PHPAPI int _php_stream_set_option(php_stream *stream, int option, int value, voi
#define php_stream_set_chunk_size(stream, size) _php_stream_set_option((stream), PHP_STREAM_OPTION_SET_CHUNK_SIZE, (size), NULL TSRMLS_CC)
+/* Flags for mkdir method in wrapper ops */
+#define PHP_STREAM_MKDIR_RECURSIVE 1
+/* define REPORT ERRORS 8 (below) */
+
+/* Flags for rmdir method in wrapper ops */
+/* define REPORT_ERRORS 8 (below) */
+
/* Flags for url_stat method in wrapper ops */
#define PHP_STREAM_URL_STAT_LINK 1
#define PHP_STREAM_URL_STAT_QUIET 2