diff options
author | Andi Gutmans <andi@php.net> | 2000-04-20 16:38:08 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-04-20 16:38:08 +0000 |
commit | e40268d07c9f0cae3f43b80e2c795a2b35253af5 (patch) | |
tree | b5c4ed2f87664876e3012642e44f2edfd9e4e1f5 /main/php_virtual_cwd.c | |
parent | ba37ae2c0b8048d2a43c8a3008f539c12a464aa5 (diff) | |
download | php-git-e40268d07c9f0cae3f43b80e2c795a2b35253af5.tar.gz |
- Add missing V_STAT()
Diffstat (limited to 'main/php_virtual_cwd.c')
-rw-r--r-- | main/php_virtual_cwd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index e773fde9ee..3613cc77f8 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -7,6 +7,7 @@ #include <stdlib.h> #include <ctype.h> + #include "php_virtual_cwd.h" #ifdef ZTS @@ -366,6 +367,21 @@ CWD_API FILE *virtual_fopen(const char *path, const char *mode) return f; } +CWD_API int virtual_stat(const char *path, struct stat *buf) +{ + cwd_state new_state; + int retval; + CWDLS_FETCH(); + + CWD_STATE_COPY(&new_state, &CWDG(cwd)); + + virtual_file_ex(&new_state, path, NULL); + + retval = stat(new_state.cwd, buf); + CWD_STATE_FREE(&new_state); + return retval; +} + #if 0 main(void) |