[ Index ]

PHP Cross Reference of phpBB-3.3.0-deutsch

title

Body

[close]

/phpbb/filesystem/ -> filesystem_interface.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 284 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

filesystem_interface:: (19 methods):
  chgrp()
  chmod()
  chown()
  clean_path()
  copy()
  dump_file()
  exists()
  is_absolute_path()
  is_readable()
  is_writable()
  make_path_relative()
  mirror()
  mkdir()
  phpbb_chmod()
  realpath()
  remove()
  rename()
  symlink()
  touch()


Interface: filesystem_interface  - X-Ref

Interface for phpBB's filesystem service

chgrp($files, $group, $recursive = false)   X-Ref
Change owner group of files/directories

param: string|array|\Traversable    $files        The file(s)/directorie(s) to change group
param: string                    $group        The group that should own the files/directories
param: bool                         $recursive    If the group should be changed recursively

chmod($files, $perms = null, $recursive = false, $force_chmod_link = false)   X-Ref
Global function for chmodding directories and files for internal use

The function accepts filesystem_interface::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.

param: string|array|\Traversable    $files                The file/directory to be chmodded
param: int                        $perms                Permissions to set
param: bool                        $recursive            If the permissions should be changed recursively
param: bool                        $force_chmod_link    Try to apply permissions to symlinks as well

chown($files, $user, $recursive = false)   X-Ref
Change owner group of files/directories

param: string|array|\Traversable    $files        The file(s)/directorie(s) to change group
param: string                    $user        The owner user name
param: bool                         $recursive    Whether change the owner recursively or not

clean_path($path)   X-Ref
Eliminates useless . and .. components from specified path.

return: string Cleaned path
param: string $path Path to clean

copy($origin_file, $target_file, $override = false)   X-Ref
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.

param: string    $origin_file    The original filename
param: string    $target_file    The target filename
param: bool        $override        Whether to override an existing file or not

dump_file($filename, $content)   X-Ref
Atomically dumps content into a file.

param: string    $filename    The file to be written to.
param: string    $content    The data to write into the file.

exists($files)   X-Ref
Checks the existence of files or directories.

return: bool    Returns true if all files/directories exist, false otherwise
param: string|array|\Traversable    $files    files/directories to check

is_absolute_path($path)   X-Ref
Checks if a path is absolute or not

return: bool    true if the path is absolute, false otherwise
param: string    $path    Path to check

is_readable($files, $recursive = false)   X-Ref
Checks if files/directories are readable

return: bool True when the files/directories are readable, otherwise false.
param: string|array|\Traversable    $files        files/directories to check
param: bool                        $recursive    Whether or not directories should be checked recursively

is_writable($files, $recursive = false)   X-Ref
Test if a file/directory is writable

return: bool True when the files/directories are writable, otherwise false.
param: string|array|\Traversable    $files        files/directories to perform write test on
param: bool                        $recursive    Whether or not directories should be checked recursively

make_path_relative($end_path, $start_path)   X-Ref
Given an existing path, convert it to a path relative to a given starting path

return: string Path of target relative to starting path
param: string $end_path        Absolute path of target
param: string $start_path    Absolute path where traversal begins

mirror($origin_dir, $target_dir, \Traversable $iterator = null, $options = array()   X-Ref
Mirrors a directory to another.

param: string        $origin_dir    The origin directory
param: string        $target_dir    The target directory
param: \Traversable    $iterator    A Traversable instance
param: array            $options    An array of boolean options

mkdir($dirs, $mode = 0777)   X-Ref
Creates a directory recursively.

param: string|array|\Traversable    $dirs    The directory path
param: int                        $mode    The directory mode

phpbb_chmod($file, $perms = null, $recursive = false, $force_chmod_link = false)   X-Ref
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 appropriate execute bit on directories.

Supported constants representing bit fields are:

filesystem_interface::CHMOD_ALL - all permissions (7)
filesystem_interface::CHMOD_READ - read permission (4)
filesystem_interface::CHMOD_WRITE - write permission (2)
filesystem_interface::CHMOD_EXECUTE - 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 is_readable() and is_writable() functions.

param: string|array|\Traversable    $file                The file/directory to be chmodded
param: int                        $perms                Permissions to set
param: bool                        $recursive            If the permissions should be changed recursively
param: bool                        $force_chmod_link    Try to apply permissions to symlinks as well

realpath($path)   X-Ref
A wrapper for PHP's realpath

Try to resolve realpath when PHP's realpath is not available, or
known to be buggy.

return: string    Resolved path
param: string    $path    Path to resolve

remove($files)   X-Ref
Removes files or directories.

param: string|array|\Traversable    $files    A filename, an array of files, or a \Traversable instance to remove

rename($origin, $target, $overwrite = false)   X-Ref
Renames a file or a directory.

param: string    $origin        The origin filename or directory
param: string    $target        The new filename or directory
param: bool        $overwrite    Whether to overwrite the target if it already exists

symlink($origin_dir, $target_dir, $copy_on_windows = false)   X-Ref
Creates a symbolic link or copy a directory.

param: string    $origin_dir            The origin directory path
param: string    $target_dir            The symbolic link name
param: bool        $copy_on_windows    Whether to copy files if on Windows

touch($files, $time = null, $access_time = null)   X-Ref
Sets access and modification time of file.

param: string|array|\Traversable    $files            A filename, an array of files, or a \Traversable instance to create
param: int                        $time            The touch time as a Unix timestamp
param: int                        $access_time    The access time as a Unix timestamp



Generated: Tue Apr 7 19:44:41 2020 Cross-referenced by PHPXref 0.7.1