PHP Class Redaxscript\Directory

Since: 2.0.0
Author: Henry Ruhs
Author: Gary Aylward
Datei anzeigen Open project: redaxmedia/redaxscript Class Usage Examples

Protected Properties

Property Type Description
$_directory string name of the directory
$_directoryArray array array of the directory
$_directoryCache array static directory cache
$_excludeArray array files to be excluded

Public Methods

Method Description
clear ( ) clear the directory
create ( string $directory = null, integer $mode = 511 ) create the directory
getArray ( ) : array get the directory array
init ( string $directory = null, array $excludeArray = [] ) init the class
put ( string $path = null, string $content = null ) put content to file
remove ( string $path = null ) remove the path

Protected Methods

Method Description
_remove ( string $path = null ) remove the path
_scan ( string $directory = null ) : array scan the directory

Method Details

_remove() protected method

remove the path
Since: 3.0.0
protected _remove ( string $path = null )
$path string name of the path

_scan() protected method

scan the directory
Since: 2.0.0
protected _scan ( string $directory = null ) : array
$directory string name of the directory
return array

clear() public method

clear the directory
Since: 3.0.0
public clear ( )

create() public method

create the directory
Since: 3.0.0
public create ( string $directory = null, integer $mode = 511 )
$directory string name of the directory
$mode integer file access mode

getArray() public method

get the directory array
Since: 2.0.0
public getArray ( ) : array
return array

init() public method

init the class
Since: 2.4.0
public init ( string $directory = null, array $excludeArray = [] )
$directory string name of the directory
$excludeArray array files to be excluded

put() public method

put content to file
Since: 3.0.0
public put ( string $path = null, string $content = null )
$path string name of the path
$content string content of the file

remove() public method

remove the path
Since: 3.0.0
public remove ( string $path = null )
$path string name of the $path

Property Details

$_directory protected_oe property

name of the directory
protected string $_directory
return string

$_directoryArray protected_oe property

array of the directory
protected array $_directoryArray
return array

$_directoryCache protected_oe static_oe property

static directory cache
protected static array $_directoryCache
return array

$_excludeArray protected_oe property

files to be excluded
protected array $_excludeArray
return array