constructor
WP_Filesystem_Direct
__construct
(mixed $arg)
-
mixed
$arg: ignored argument
Change directory
bool
chdir
(string $dir)
-
string
$dir: The new current directory.
Changes file group
bool
chgrp
(string $file, mixed $group, [bool $recursive = false])
-
string
$file: Path to the file.
-
mixed
$group: A group name or number.
-
bool
$recursive: (optional) If set True changes file group recursivly. Defaults to False.
Changes filesystem permissions
bool
chmod
(string $file, [int $mode = false], [bool $recursive = false])
-
string
$file: Path to the file.
-
int
$mode: (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs.
-
bool
$recursive: (optional) If set True changes file group recursivly. Defaults to False.
Changes file owner
bool
chown
(string $file, mixed $owner, [bool $recursive = false])
-
string
$file: Path to the file.
-
mixed
$owner: A user name or number.
-
bool
$recursive: (optional) If set True changes file owner recursivly. Defaults to False.
connect filesystem.
bool
connect
()
void
copy
( $source, $destination, [ $overwrite = false], [ $mode = false])
-
$source
-
$destination
-
$overwrite
-
$mode
Gets the current working directory
string|bool
cwd
()
void
delete
( $file, [ $recursive = false], [ $type = false])
void
dirlist
( $path, [ $include_hidden = true], [ $recursive = false])
-
$path
-
$include_hidden
-
$recursive
Gets file permissions
FIXME does not handle errors in fileperms()
string
getchmod
(string $file)
-
string
$file: Path to the file.
Reads entire file into a string
string|bool
get_contents
(string $file)
-
string
$file: Name of the file to read.
Reads entire file into an array
array|bool
get_contents_array
(string $file)
-
string
$file: Path to the file.
void
is_readable
( $file)
void
is_writable
( $file)
void
mkdir
( $path, [ $chmod = false], [ $chown = false], [ $chgrp = false])
-
$path
-
$chmod
-
$chown
-
$chgrp
void
move
( $source, $destination, [ $overwrite = false])
-
$source
-
$destination
-
$overwrite
Gets file owner
string
owner
(string $file)
-
string
$file: Path to the file.
Write a string to a file
bool
put_contents
(string $file, string $contents, [int $mode = false])
-
string
$file: Remote path to the file where to write the data.
-
string
$contents: The data to write.
-
int
$mode: (optional) The file permissions as octal number, usually 0644.
void
rmdir
( $path, [ $recursive = false])
void
touch
( $file, [ $time = 0], [ $atime = 0])