Universal stream wrapper implementation.

package filicious-core
author Christian Schiffler
author Tristan Lins
author Oliver Hoff

 Methods

Close directory handle.

dir_closedir() : boolean

Returns

boolean

Open directory handle

dir_opendir(string $path, int $options) : boolean

Parameters

$path

string

$options

int

Returns

boolean

Read entry from directory handle.

dir_readdir() : string | boolean

Returns

stringboolean

Rewind directory handle.

dir_rewinddir() : boolean

Returns

boolean

Create a directory

mkdir(string $path, int $mode, int $options) : boolean

Parameters

$path

string

$mode

int

$options

int

Returns

boolean

Renames a file or directory

rename(string $path_from, string $path_to) : boolean

Parameters

$path_from

string

$path_to

string

Returns

boolean

Removes a directory

rmdir(string $path, int $options) : bool

Parameters

$path

string

$options

int

Returns

bool

Retrieve the underlaying resource

stream_cast(int $cast_as) : resource

Parameters

$cast_as

int

Returns

resource

Close an resource

stream_close() 

Tests for end-of-file on a file pointer

stream_eof() : boolean

Returns

boolean

Flushes the output

stream_flush() : boolean

Returns

boolean

Advisory file locking

stream_lock(\Filicious\Stream\mode $operation) : boolean

Parameters

Returns

boolean

Opens file or URL

stream_open(string $path, string $mode, int $options, string $opened_path) : bool

Parameters

$path

string

$mode

string

$options

int

$opened_path

string

Returns

bool

Read from stream

stream_read(int $count) : string

Parameters

$count

int

Returns

string

Seeks to specific location in a stream

stream_seek(int $offset, int $whence) : boolean

Parameters

$offset

int

$whence

int

Returns

boolean

Retrieve information about a file resource

stream_stat() : array

Returns

array

Retrieve the current position of a stream

stream_tell() : int

Returns

int

Truncate stream

stream_truncate(int $new_size) : boolean

Parameters

$new_size

int

Returns

boolean

Write to stream

stream_write(string $data) : int

Parameters

$data

string

Returns

int

Retrieve information about a file

url_stat(string $url, int $flags) 

Parameters

$url

string

$flags

int

Search for the filesystem and open a file from stream url.

openFile(string $url) : \Filicious\File

Parameters

$url

string

Returns

 Properties

 

$context

$context : null
 

$directoryIterator

$directoryIterator : \Filicious\Iterator\FilesystemIterator
 

$file

$file : \Filicious\File
 

$fs

$fs : \Filicious\Filesystem
 

$stream

$stream : \Filicious\Stream
 

$url

$url : object