PHP 클래스 TestFileSystemStream

저자: Jaroslav Hanslík
파일 보기 프로젝트 열기: jyxo/php 1 사용 예제들

공개 메소드들

메소드 설명
register ( string $protocol ) : boolean Registers a protocol.
setError ( integer $error ) Sets error type.
stream_close ( ) : boolean Closes a file.
stream_eof ( ) : boolean Returns if the pointer is at the end of the file.
stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean Opens a file.
stream_read ( integer $length ) : string Reads from a file.
stream_stat ( ) : array Retrieves information about a file.
stream_write ( string $data ) : integer Writes into a file.
unlink ( string $path ) : boolean Deletes a file.
unregister ( string $protocol ) : boolean Unregisters a protocol.

메소드 상세

register() 공개 정적인 메소드

Registers a protocol.
public static register ( string $protocol ) : boolean
$protocol string Protocol name
리턴 boolean

setError() 공개 정적인 메소드

Sets error type.
public static setError ( integer $error )
$error integer Error type

stream_close() 공개 메소드

Closes a file.
public stream_close ( ) : boolean
리턴 boolean

stream_eof() 공개 메소드

Returns if the pointer is at the end of the file.
public stream_eof ( ) : boolean
리턴 boolean

stream_open() 공개 메소드

Opens a file.
public stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean
$path string File path
$mode string Open mode
$options integer Additional options
$openedPath string Opened file path
리턴 boolean

stream_read() 공개 메소드

Reads from a file.
public stream_read ( integer $length ) : string
$length integer Read length
리턴 string

stream_stat() 공개 메소드

Retrieves information about a file.
public stream_stat ( ) : array
리턴 array

stream_write() 공개 메소드

Writes into a file.
public stream_write ( string $data ) : integer
$data string Data to be written
리턴 integer Number of bytes written

unregister() 공개 정적인 메소드

Unregisters a protocol.
public static unregister ( string $protocol ) : boolean
$protocol string Protocol name
리턴 boolean