PHP 클래스 Elgg\Filesystem\File

부터: 1.10.0
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 메소드들

메소드 설명
__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