PHP Класс TestFileSystemStream

Автор: Jaroslav Hanslík
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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