Свойство | Тип | Описание | |
---|---|---|---|
$umask | initial umask setting |
Метод | Описание | |
---|---|---|
copyFromFileSystem ( string $path, |
copies the file system structure from given path into the base dir | |
create ( array $structure, |
creates vfsStream directory structure from an array and adds it to given base dir | |
disableDotfiles ( ) | disable dotfiles in directory listings | |
enableDotfiles ( ) | enable dotfiles in directory listings | |
getCurrentGroup ( ) : integer | returns current group | |
getCurrentUser ( ) : integer | returns current user | |
inspect ( org\bovigo\vfs\visitor\vfsStreamVisitor $visitor, org\bovigo\vfs\vfsStreamContent $content = null ) : org\bovigo\vfs\visitor\vfsStreamVisitor | use visitor to inspect a content structure | |
newBlock ( string $name, integer $permissions = null ) : org\bovigo\vfs\vfsStreamBlock | returns a new block with the given name | |
newDirectory ( string $name, integer $permissions = null ) : |
returns a new directory with given name | |
newFile ( string $name, integer $permissions = null ) : org\bovigo\vfs\vfsStreamFile | returns a new file with given name | |
path ( string $url ) : string | restores the path from the url | |
setQuota ( integer $bytes ) | sets quota to given amount of bytes | |
setup ( string $rootDirName = 'root', integer $permissions = null, array $structure = [] ) : |
helper method for setting up vfsStream in unit tests | |
umask ( integer $umask = null ) : integer | sets new umask setting and returns previous umask setting | |
url ( string $path ) : string | prepends the scheme to the given URL | |
useDotfiles ( ) : boolean | checks if vfsStream lists dotfiles in directory listings |
Метод | Описание | |
---|---|---|
addStructure ( array $structure, |
helper method to create subdirectories recursively |
protected static addStructure ( array $structure, |
||
$structure | array | subdirectory structure to add |
$baseDir | directory to add the structure to | |
Результат |
public static copyFromFileSystem ( string $path, |
||
$path | string | path to copy the structure from |
$baseDir | directory to add the structure to | |
$maxFileSize | integer | maximum file size of files to copy content from |
Результат |
array('Core' = array('AbstractFactory' => array('test.php' => 'some text content',
'other.php' => 'Some more text content',
'Invalid.csv' => 'Something else',
),
'AnEmptyFolder' => array(),
'badlocation.php' => 'some bad content',
)
)
the resulting directory tree will look like this:
baseDir \- Core |- badlocation.php |- AbstractFactory | |- test.php | |- other.php | \- Invalid.csv \- AnEmptyFolderArrays will become directories with their key as directory name, and strings becomes files with their key as file name and their value as file content. If no baseDir is given it will try to add the structure to the existing root directory without replacing existing childs except those with equal names.
public static disableDotfiles ( ) |
public static enableDotfiles ( ) |
public static getCurrentGroup ( ) : integer | ||
Результат | integer |
public static getCurrentUser ( ) : integer | ||
Результат | integer |
public static inspect ( org\bovigo\vfs\visitor\vfsStreamVisitor $visitor, org\bovigo\vfs\vfsStreamContent $content = null ) : org\bovigo\vfs\visitor\vfsStreamVisitor | ||
$visitor | org\bovigo\vfs\visitor\vfsStreamVisitor | the visitor who inspects |
$content | org\bovigo\vfs\vfsStreamContent | directory structure to inspect |
Результат | org\bovigo\vfs\visitor\vfsStreamVisitor |
public static newDirectory ( string $name, integer $permissions = null ) : |
||
$name | string | name of directory to create |
$permissions | integer | permissions of directory to create |
Результат |
array('Core' = array('AbstractFactory' => array('test.php' => 'some text content',
'other.php' => 'Some more text content',
'Invalid.csv' => 'Something else',
),
'AnEmptyFolder' => array(),
'badlocation.php' => 'some bad content',
)
)
the resulting directory tree will look like this:
root \- Core |- badlocation.php |- AbstractFactory | |- test.php | |- other.php | \- Invalid.csv \- AnEmptyFolderArrays will become directories with their key as directory name, and strings becomes files with their key as file name and their value as file content.
public static setup ( string $rootDirName = 'root', integer $permissions = null, array $structure = [] ) : |
||
$rootDirName | string | name of root directory |
$permissions | integer | file permissions of root directory |
$structure | array | directory structure to add under root directory |
Результат |
public static useDotfiles ( ) : boolean | ||
Результат | boolean |