PHP Класс Elgg\Filesystem\File

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

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

Метод Описание
__construct ( Elgg\Filesystem\Directory $directory, string $path ) Constructor
__toString ( )
exists ( ) : boolean
getBasename ( ) : string
getContents ( ) : string Get the text content of this file. Empty string if it doesn't exist.
getExtension ( ) : string
getPath ( ) : string
includeFile ( ) : mixed Do a PHP include of the file and return the result.
putContents ( string $content ) : void Put content into this file.

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

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

Constructor
public __construct ( Elgg\Filesystem\Directory $directory, string $path )
$directory Elgg\Filesystem\Directory The directory where this file resides
$path string The path to this file relative to the directory

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

public __toString ( )

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

public exists ( ) : boolean
Результат boolean Whether this file exists.

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

public getBasename ( ) : string
Результат string The file's basename.

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

Get the text content of this file. Empty string if it doesn't exist.
public getContents ( ) : string
Результат string

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

public getExtension ( ) : string
Результат string The file's extension.

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

public getPath ( ) : string
Результат string The full path to this file.

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

TODO(ewinslow): This may only work for local filesystems?
public includeFile ( ) : mixed
Результат mixed

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

Put content into this file.
public putContents ( string $content ) : void
$content string File content
Результат void