WPDev.one
Core Class

WP_Filesystem_ftpsockets

class WP_Filesystem_ftpsockets // Constructor: function Object() { [native code] }

WordPress Filesystem Class for implementing FTP Sockets.

Methods 27 methods

Method / Return Description
__construct()
void

Constructor.

Parameters: $opt: mixed
connect()
bool

Connects filesystem.

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
chmod()
bool

Changes filesystem permissions.

Parameters: $file: mixed, $mode: 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
__destruct()
void

Destructor.

Properties

Property / Type Description
$ftp
mixed
public
No description available.

Class Information

Since Version
2.5.0
Source File
wp-admin/includes/class-wp-filesystem-ftpsockets.php
Advertisement