WP_Filesystem_Direct
class WP_Filesystem_Direct
// Constructor: function Object() { [native code] } WordPress Filesystem Class for direct PHP file and folder manipulation.
Methods 27 methods
| Method / Return | Description |
|---|---|
| __construct() void | Constructor.
Parameters: $arg: mixed |
| get_contents() (string | Reads entire file into a string.
Parameters: $file: mixed |
| get_contents_array() (array | Reads entire file into an array.
Parameters: $file: mixed |
| put_contents() bool | Writes a string to a file.
Parameters: $file: mixed, $contents: mixed, $mode: mixed |
| cwd() (string | Gets the current working directory. |
| chdir() bool | Changes current directory.
Parameters: $dir: mixed |
| chgrp() bool | Changes the file group.
Parameters: $file: mixed, $group: mixed, $recursive: mixed |
| chmod() bool | Changes filesystem permissions.
Parameters: $file: mixed, $mode: mixed, $recursive: mixed |
| chown() bool | Changes the owner of a file or directory.
Parameters: $file: mixed, $owner: mixed, $recursive: mixed |
| owner() (string | Gets the file owner.
Parameters: $file: mixed |
| getchmod() string | Gets the permissions of the specified file or filepath in their octal format.
Parameters: $file: mixed |
| group() (string | Gets the file's group.
Parameters: $file: mixed |
| copy() bool | Copies a file.
Parameters: $source: mixed, $destination: mixed, $overwrite: mixed, $mode: mixed |
| move() bool | Moves a file or directory.
Parameters: $source: mixed, $destination: mixed, $overwrite: mixed |
| delete() bool | Deletes a file or directory.
Parameters: $file: mixed, $recursive: mixed, $type: mixed |
| exists() bool | Checks if a file or directory exists.
Parameters: $path: mixed |
| is_file() bool | Checks if resource is a file.
Parameters: $file: mixed |
| is_dir() bool | Checks if resource is a directory.
Parameters: $path: mixed |
| is_readable() bool | Checks if a file is readable.
Parameters: $file: mixed |
| is_writable() bool | Checks if a file or directory is writable.
Parameters: $path: mixed |
| atime() (int | Gets the file's last access time.
Parameters: $file: mixed |
| mtime() (int | Gets the file modification time.
Parameters: $file: mixed |
| size() (int | Gets the file size (in bytes).
Parameters: $file: mixed |
| touch() bool | Sets the access and modification times of a file.
Parameters: $file: mixed, $time: mixed, $atime: mixed |
| mkdir() bool | Creates a directory.
Parameters: $path: mixed, $chmod: mixed, $chown: mixed, $chgrp: mixed |
| rmdir() bool | Deletes a directory.
Parameters: $path: mixed, $recursive: mixed |
| dirlist() (array | Gets details for files in a directory or a specific file.
Parameters: $path: mixed, $include_hidden: mixed, $recursive: mixed |