class filesystem extends filesystem
Methods
__construct()
Constructor |
from filesystem | |
chgrp(string|array|Traversable $files, string $group, bool $recursive = false)
Change owner group of files/directories |
from filesystem | |
chmod(string|array|Traversable $files, int $perms = null, bool $recursive = false, bool $force_chmod_link = false)
Global function for chmodding directories and files for internal use |
from filesystem | |
chown(string|array|Traversable $files, string $user, bool $recursive = false)
Change owner group of files/directories |
from filesystem | |
string |
clean_path(string $path)
Eliminates useless . |
from filesystem |
copy(string $origin_file, string $target_file, bool $override = false)
Copies a file. |
from filesystem | |
dump_file(string $filename, string $content)
Atomically dumps content into a file. |
from filesystem | |
bool |
exists(string|array|Traversable $files)
Checks the existence of files or directories. |
from filesystem |
is_absolute_path(string $path)
Checks if a path is absolute or not |
from filesystem | |
bool |
is_readable(string|array|Traversable $files, bool $recursive = false)
Checks if files/directories are readable |
from filesystem |
bool |
is_writable(string|array|Traversable $files, bool $recursive = false)
Test if a file/directory is writable |
from filesystem |
string |
make_path_relative(string $end_path, string $start_path)
Given an existing path, convert it to a path relative to a given starting path |
from filesystem |
mirror(string $origin_dir, string $target_dir, Traversable $iterator = null, array $options = array())
Mirrors a directory to another. |
from filesystem | |
mkdir(string|array|Traversable $dirs, int $mode = 511)
Creates a directory recursively. |
from filesystem | |
phpbb_chmod($files, int $perms = null, bool $recursive = false, bool $force_chmod_link = false)
Global function for chmodding directories and files for internal use |
from filesystem | |
string |
realpath(string $path)
A wrapper for PHP's realpath |
from filesystem |
remove(string|array|Traversable $files)
Removes files or directories. |
from filesystem | |
rename(string $origin, string $target, bool $overwrite = false)
Renames a file or a directory. |
from filesystem | |
symlink(string $origin_dir, string $target_dir, bool $copy_on_windows = false)
Creates a symbolic link or copy a directory. |
from filesystem | |
touch(string|array|Traversable $files, int $time = null, int $access_time = null)
Sets access and modification time of file. |
from filesystem |
Details
in filesystem at line 47
public
__construct()
Constructor
in filesystem at line 57
public
chgrp(string|array|Traversable $files, string $group, bool $recursive = false)
Change owner group of files/directories
in filesystem at line 77
public
chmod(string|array|Traversable $files, int $perms = null, bool $recursive = false, bool $force_chmod_link = false)
Global function for chmodding directories and files for internal use
The function accepts filesysteminterface::CHMOD flags in the permission argument or the user can specify octal values (or any integer if it makes sense). All directories will have an execution bit appended, if the user group (owner, group or other) has any bit specified.
in filesystem at line 143
public
chown(string|array|Traversable $files, string $user, bool $recursive = false)
Change owner group of files/directories
in filesystem at line 163
public string
clean_path(string $path)
Eliminates useless .
and .. components from specified path.
in filesystem at line 190
public
copy(string $origin_file, string $target_file, bool $override = false)
Copies a file.
This method only copies the file if the origin file is newer than the target file.
By default, if the target already exists, it is not overridden.
in filesystem at line 205
public
dump_file(string $filename, string $content)
Atomically dumps content into a file.
in filesystem at line 220
public bool
exists(string|array|Traversable $files)
Checks the existence of files or directories.
in filesystem at line 228
public
is_absolute_path(string $path)
Checks if a path is absolute or not
in filesystem at line 236
public bool
is_readable(string|array|Traversable $files, bool $recursive = false)
Checks if files/directories are readable
in filesystem at line 260
public bool
is_writable(string|array|Traversable $files, bool $recursive = false)
Test if a file/directory is writable
in filesystem at line 306
public string
make_path_relative(string $end_path, string $start_path)
Given an existing path, convert it to a path relative to a given starting path
in filesystem at line 314
public
mirror(string $origin_dir, string $target_dir, Traversable $iterator = null, array $options = array())
Mirrors a directory to another.
in filesystem at line 332
public
mkdir(string|array|Traversable $dirs, int $mode = 511)
Creates a directory recursively.
in filesystem at line 350
public
phpbb_chmod($files, int $perms = null, bool $recursive = false, bool $force_chmod_link = false)
Global function for chmodding directories and files for internal use
This function determines owner and group whom the file belongs to and user and group of PHP and then set safest possible file permissions. The function determines owner and group from common.php file and sets the same to the provided file. The function uses bit fields to build the permissions. The function sets the appropiate execute bit on directories.
Supported constants representing bit fields are:
filesysteminterface::CHMODALL - all permissions (7) filesysteminterface::CHMODREAD - read permission (4) filesysteminterface::CHMODWRITE - write permission (2) filesysteminterface::CHMODEXECUTE - execute permission (1)
NOTE: The function uses POSIX extension and fileowner()/filegroup() functions. If any of them is disabled, this function tries to build proper permissions, by calling isreadable() and iswritable() functions.
in filesystem at line 487
public string
realpath(string $path)
A wrapper for PHP's realpath
Try to resolve realpath when PHP's realpath is not available, or known to be buggy.
in filesystem at line 515
public
remove(string|array|Traversable $files)
Removes files or directories.
in filesystem at line 535
public
rename(string $origin, string $target, bool $overwrite = false)
Renames a file or a directory.
in filesystem at line 553
public
symlink(string $origin_dir, string $target_dir, bool $copy_on_windows = false)
Creates a symbolic link or copy a directory.
in filesystem at line 568
public
touch(string|array|Traversable $files, int $time = null, int $access_time = null)
Sets access and modification time of file.