PHP Class WP_Filesystem_MockFS

Inheritance: extends WP_Filesystem_Base
Show file Open project: lucatume/wp-browser

Public Properties

Property Type Description
$errors Holds a array of objects which contain an array of objects, etc.
$method a fast more efficient way of determining if a path exists, and access to that node
$verbose

Public Methods

Method Description
__construct ( )
abspath ( $path = false ) Copy of core's function, but accepts a path.
chdir ( $path )
connect ( )
cwd ( )
dirlist ( $path = '.', $include_hidden = true, $recursive = false )
exists ( $path )
get_contents ( $file )
init ( $paths = '', $home_dir = '/' ) Sets initial filesystem environment and/or clears the current environment.
is_dir ( $path ) Mock FS specific functions:
is_file ( $file )
mkdir ( $path, $chmod = false, $chown = false, $chgrp = false )
put_contents ( $path, $contents = '', $mode = null )
setfs ( $paths ) "Bulk Loads" a filesystem into the internal virtual filesystem

Private Methods

Method Description
locate_node ( $path ) Locates a filesystem "node"
locate_parent_node ( $path ) Locates a filesystem node for the parent of the given item

Method Details

__construct() public method

public __construct ( )

abspath() public method

Copy of core's function, but accepts a path.
public abspath ( $path = false )

chdir() public method

public chdir ( $path )

connect() public method

public connect ( )

cwd() public method

public cwd ( )

dirlist() public method

public dirlist ( $path = '.', $include_hidden = true, $recursive = false )

exists() public method

public exists ( $path )

get_contents() public method

public get_contents ( $file )

init() public method

Can also be passed the initial filesystem to be setup which is passed to self::setfs()
public init ( $paths = '', $home_dir = '/' )

is_dir() public method

Mock FS specific functions:
public is_dir ( $path )

is_file() public method

public is_file ( $file )

mkdir() public method

public mkdir ( $path, $chmod = false, $chown = false, $chgrp = false )

put_contents() public method

public put_contents ( $path, $contents = '', $mode = null )

setfs() public method

"Bulk Loads" a filesystem into the internal virtual filesystem
public setfs ( $paths )

Property Details

$errors public property

Holds a array of objects which contain an array of objects, etc.
public $errors

$method public property

a fast more efficient way of determining if a path exists, and access to that node
public $method

$verbose public property

public $verbose