PHP Класс JonathanTorres\Construct\Helpers\Filesystem

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
copy ( string $path, string $target ) : boolean Copy the given file a new location.
get ( string $path ) : string Get the contents of a file.
getDefaultConfigurationFile ( ) : string Get the default construct configuration file.
getHomeDirectory ( $os = PHP_OS ) : string Get the home directory.
hasDefaultConfigurationFile ( ) : boolean Determine if system has a default configuration file.
isDirectory ( string $path ) : boolean Check if the path is a directory.
isFile ( string $path ) : boolean Check if the path is a file.
isReadable ( string $path ) : boolean Check if the path is readable.
makeDirectory ( string $path, boolean $recursive = false ) : boolean Create a directory
move ( string $path, string $target ) : boolean Move the given file to a new location.
put ( string $path, string $contents ) : integer Write the contents of a file.

Описание методов

copy() публичный Метод

Copy the given file a new location.
public copy ( string $path, string $target ) : boolean
$path string
$target string
Результат boolean

get() публичный Метод

Get the contents of a file.
public get ( string $path ) : string
$path string
Результат string

getDefaultConfigurationFile() публичный Метод

Get the default construct configuration file.
public getDefaultConfigurationFile ( ) : string
Результат string

getHomeDirectory() публичный Метод

Get the home directory.
public getHomeDirectory ( $os = PHP_OS ) : string
Результат string

hasDefaultConfigurationFile() публичный Метод

Determine if system has a default configuration file.
public hasDefaultConfigurationFile ( ) : boolean
Результат boolean boolean

isDirectory() публичный Метод

Check if the path is a directory.
public isDirectory ( string $path ) : boolean
$path string
Результат boolean

isFile() публичный Метод

Check if the path is a file.
public isFile ( string $path ) : boolean
$path string
Результат boolean

isReadable() публичный Метод

Check if the path is readable.
public isReadable ( string $path ) : boolean
$path string
Результат boolean

makeDirectory() публичный Метод

Create a directory
public makeDirectory ( string $path, boolean $recursive = false ) : boolean
$path string
$recursive boolean Defaults to false.
Результат boolean

move() публичный Метод

Move the given file to a new location.
public move ( string $path, string $target ) : boolean
$path string
$target string
Результат boolean

put() публичный Метод

Write the contents of a file.
public put ( string $path, string $contents ) : integer
$path string
$contents string
Результат integer