F.10. Directory
Function | Returns | Description |
---|---|---|
opendir(string path) | mixed | Opens a directory and returns a dir_handle. |
dir(string directory) | object | Directory class with properties handle and path, and methods read, rewind, and close. |
closedir([resource dir_handle]) | void | Closes directory connection identified by the dir_handle. |
chroot(string directory) | bool | Changes root directory. |
chdir(string directory) | bool | Changes the current directory. |
getcwd(void) | mixed | Gets the current directory. |
rewinddir([resource dir_handle]) | void | Rewinds dir_handle back to the start. |
readdir([resource dir_handle]) | string | Reads directory entry from dir_handle. |
glob(string pattern [, int flags]) | array | Finds pathnames matching a pattern. |
scandir(string dir [, int sorting_order]) | array | Lists files and directories inside the specified path. |
dl(string extension_filename) | int | Loads a PHP extension at runtime. |
Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.