[ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
WordPress FTP Sockets Filesystem.
File Size: | 689 lines (17 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Filesystem_ftpsockets:: (27 methods):
__construct()
connect()
get_contents()
get_contents_array()
put_contents()
cwd()
chdir()
chmod()
owner()
getchmod()
group()
copy()
move()
delete()
exists()
is_file()
is_dir()
is_readable()
is_writable()
atime()
mtime()
size()
touch()
mkdir()
rmdir()
dirlist()
__destruct()
Class: WP_Filesystem_ftpsockets - X-Ref
WordPress Filesystem Class for implementing FTP Sockets.__construct( $opt = '' ) X-Ref |
Constructor. since: 2.5.0 param: array $opt |
connect() X-Ref |
Connects filesystem. return: bool True on success, false on failure. since: 2.5.0 |
get_contents( $file ) X-Ref |
Reads entire file into a string. return: string|false Read data on success, false if no temporary file could be opened, since: 2.5.0 param: string $file Name of the file to read. |
get_contents_array( $file ) X-Ref |
Reads entire file into an array. return: array|false File contents in an array on success, false on failure. since: 2.5.0 param: string $file Path to the file. |
put_contents( $file, $contents, $mode = false ) X-Ref |
Writes a string to a file. return: bool True on success, false on failure. since: 2.5.0 param: string $file Remote path to the file where to write the data. param: string $contents The data to write. param: int|false $mode Optional. The file permissions as octal number, usually 0644. |
cwd() X-Ref |
Gets the current working directory. return: string|false The current working directory on success, false on failure. since: 2.5.0 |
chdir( $dir ) X-Ref |
Changes current directory. return: bool True on success, false on failure. since: 2.5.0 param: string $dir The new current directory. |
chmod( $file, $mode = false, $recursive = false ) X-Ref |
Changes filesystem permissions. return: bool True on success, false on failure. since: 2.5.0 param: string $file Path to the file. param: int|false $mode Optional. The permissions as octal number, usually 0644 for files, param: bool $recursive Optional. If set to true, changes file permissions recursively. |
owner( $file ) X-Ref |
Gets the file owner. return: string|false Username of the owner on success, false on failure. since: 2.5.0 param: string $file Path to the file. |
getchmod( $file ) X-Ref |
Gets the permissions of the specified file or filepath in their octal format. return: string Mode of the file (the last 3 digits). since: 2.5.0 param: string $file Path to the file. |
group( $file ) X-Ref |
Gets the file's group. return: string|false The group on success, false on failure. since: 2.5.0 param: string $file Path to the file. |
copy( $source, $destination, $overwrite = false, $mode = false ) X-Ref |
Copies a file. return: bool True on success, false on failure. since: 2.5.0 param: string $source Path to the source file. param: string $destination Path to the destination file. param: bool $overwrite Optional. Whether to overwrite the destination file if it exists. param: int|false $mode Optional. The permissions as octal number, usually 0644 for files, |
move( $source, $destination, $overwrite = false ) X-Ref |
Moves a file. return: bool True on success, false on failure. since: 2.5.0 param: string $source Path to the source file. param: string $destination Path to the destination file. param: bool $overwrite Optional. Whether to overwrite the destination file if it exists. |
delete( $file, $recursive = false, $type = false ) X-Ref |
Deletes a file or directory. return: bool True on success, false on failure. since: 2.5.0 param: string $file Path to the file or directory. param: bool $recursive Optional. If set to true, deletes files and folders recursively. param: string|false $type Type of resource. 'f' for file, 'd' for directory. |
exists( $file ) X-Ref |
Checks if a file or directory exists. return: bool Whether $file exists or not. since: 2.5.0 param: string $file Path to file or directory. |
is_file( $file ) X-Ref |
Checks if resource is a file. return: bool Whether $file is a file. since: 2.5.0 param: string $file File path. |
is_dir( $path ) X-Ref |
Checks if resource is a directory. return: bool Whether $path is a directory. since: 2.5.0 param: string $path Directory path. |
is_readable( $file ) X-Ref |
Checks if a file is readable. return: bool Whether $file is readable. since: 2.5.0 param: string $file Path to file. |
is_writable( $file ) X-Ref |
Checks if a file or directory is writable. return: bool Whether $file is writable. since: 2.5.0 param: string $file Path to file or directory. |
atime( $file ) X-Ref |
Gets the file's last access time. return: int|false Unix timestamp representing last access time, false on failure. since: 2.5.0 param: string $file Path to file. |
mtime( $file ) X-Ref |
Gets the file modification time. return: int|false Unix timestamp representing modification time, false on failure. since: 2.5.0 param: string $file Path to file. |
size( $file ) X-Ref |
Gets the file size (in bytes). return: int|false Size of the file in bytes on success, false on failure. since: 2.5.0 param: string $file Path to file. |
touch( $file, $time = 0, $atime = 0 ) X-Ref |
Sets the access and modification times of a file. Note: If $file doesn't exist, it will be created. return: bool True on success, false on failure. since: 2.5.0 param: string $file Path to file. param: int $time Optional. Modified time to set for file. param: int $atime Optional. Access time to set for file. |
mkdir( $path, $chmod = false, $chown = false, $chgrp = false ) X-Ref |
Creates a directory. return: bool True on success, false on failure. since: 2.5.0 param: string $path Path for new directory. param: int|false $chmod Optional. The permissions as octal number (or false to skip chmod). param: string|int|false $chown Optional. A user name or number (or false to skip chown). param: string|int|false $chgrp Optional. A group name or number (or false to skip chgrp). |
rmdir( $path, $recursive = false ) X-Ref |
Deletes a directory. return: bool True on success, false on failure. since: 2.5.0 param: string $path Path to directory. param: bool $recursive Optional. Whether to recursively remove files/directories. |
dirlist( $path = '.', $include_hidden = true, $recursive = false ) X-Ref |
Gets details for files in a directory or a specific file. return: array|false { since: 2.5.0 param: string $path Path to directory or file. param: bool $include_hidden Optional. Whether to include details of hidden ("." prefixed) files. param: bool $recursive Optional. Whether to recursively include file details in nested directories. |
__destruct() X-Ref |
Destructor. since: 2.5.0 |
Generated: Tue Oct 8 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |