PHP Class TestFileSystemStream

Author: Jaroslav Hanslík
Afficher le fichier Open project: jyxo/php Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

register() public static méthode

Registers a protocol.
public static register ( string $protocol ) : boolean
$protocol string Protocol name
Résultat boolean

setError() public static méthode

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

stream_close() public méthode

Closes a file.
public stream_close ( ) : boolean
Résultat boolean

stream_eof() public méthode

Returns if the pointer is at the end of the file.
public stream_eof ( ) : boolean
Résultat boolean

stream_open() public méthode

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
Résultat boolean

stream_read() public méthode

Reads from a file.
public stream_read ( integer $length ) : string
$length integer Read length
Résultat string

stream_stat() public méthode

Retrieves information about a file.
public stream_stat ( ) : array
Résultat array

stream_write() public méthode

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

unregister() public static méthode

Unregisters a protocol.
public static unregister ( string $protocol ) : boolean
$protocol string Protocol name
Résultat boolean