PHP Class Zephir\FileSystem\HardDisk

Uses the standard hard-disk as filesystem for temporary operations
Afficher le fichier Open project: phalcon/zephir

Protected Properties

Свойство Type Description
$basePath
$initialized

Méthodes publiques

Méthode Description
__construct ( string $basePath = '.temp/' ) HardDisk constructor
clean ( ) Deletes the temporary directory
exists ( string $path ) : boolean Checks whether a temporary entry does exist
file ( string $path ) : array Returns a temporary entry as an array
getHashFile ( string $algorithm, string $path, boolean $cache = false ) : string This function does not perform operations in the temporary directory but it caches the results to avoid reprocessing
initialize ( ) Initialize the filesystem
isInitialized ( ) : boolean Checks if the filesystem is initialized
makeDirectory ( string $path ) : boolean Creates a directory inside the temporary container
modificationTime ( string $path ) : boolean Returns the modification time of a temporary entry
read ( string $path ) Writes data from a temporary entry
requireFile ( string $path ) : mixed Requires a file from the temporary directory
system ( string $command, string $descriptor, string $destination ) Executes a command and saves the result into a temporary entry
write ( string $path, string $data ) Writes data into a temporary entry

Method Details

__construct() public méthode

HardDisk constructor
public __construct ( string $basePath = '.temp/' )
$basePath string

clean() public méthode

Deletes the temporary directory
public clean ( )

exists() public méthode

Checks whether a temporary entry does exist
public exists ( string $path ) : boolean
$path string
Résultat boolean

file() public méthode

Returns a temporary entry as an array
public file ( string $path ) : array
$path string
Résultat array

getHashFile() public méthode

This function does not perform operations in the temporary directory but it caches the results to avoid reprocessing
public getHashFile ( string $algorithm, string $path, boolean $cache = false ) : string
$algorithm string
$path string
$cache boolean
Résultat string

initialize() public méthode

Initialize the filesystem
public initialize ( )

isInitialized() public méthode

Checks if the filesystem is initialized
public isInitialized ( ) : boolean
Résultat boolean

makeDirectory() public méthode

Creates a directory inside the temporary container
public makeDirectory ( string $path ) : boolean
$path string
Résultat boolean

modificationTime() public méthode

Returns the modification time of a temporary entry
public modificationTime ( string $path ) : boolean
$path string
Résultat boolean

read() public méthode

Writes data from a temporary entry
public read ( string $path )
$path string

requireFile() public méthode

Requires a file from the temporary directory
public requireFile ( string $path ) : mixed
$path string
Résultat mixed

system() public méthode

Executes a command and saves the result into a temporary entry
public system ( string $command, string $descriptor, string $destination )
$command string
$descriptor string
$destination string

write() public méthode

Writes data into a temporary entry
public write ( string $path, string $data )
$path string
$data string

Property Details

$basePath protected_oe property

protected $basePath

$initialized protected_oe property

protected $initialized