diff options
author | Stanislav Malyshev <stas@php.net> | 2000-06-04 08:29:11 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2000-06-04 08:29:11 +0000 |
commit | 5af7dff7581ac7314c57ed525d590f9709a5d432 (patch) | |
tree | c8eb9f80133958d39341f6c90a4351bb3527d832 /main/php_virtual_cwd.c | |
parent | 375474ce8632b113d025861308057c44573b2900 (diff) | |
download | php-git-5af7dff7581ac7314c57ed525d590f9709a5d432.tar.gz |
add opendir to VIRTUAL_DIR
Diffstat (limited to 'main/php_virtual_cwd.c')
-rw-r--r-- | main/php_virtual_cwd.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index 412929db15..03ba8f4b21 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -533,6 +533,21 @@ CWD_API int virtual_rmdir(const char *pathname) return retval; } +CWD_API DIR *virtual_opendir(const char *pathname) +{ + cwd_state new_state; + DIR *retval; + CWDLS_FETCH(); + + CWD_STATE_COPY(&new_state, &CWDG(cwd)); + virtual_file_ex(&new_state, pathname, NULL); + + retval = opendir(new_state.cwd); + + CWD_STATE_FREE(&new_state); + return retval; +} + #if 0 main(void) |