class Wrapper

Stream wrapper class. This is the class that PHP uses as the stream operations handler.

Properties

$context

Methods

string
stripScheme(string $path)

Returns path stripped of url scheme (http://, ftp://, test:// etc.)

getContainerFromContext($path)

Returns Container object fished form defaultcontextoptions by scheme.

int
stream_tell()

No description

void
stream_close()

No description

bool
stream_open(string $path, int $mode, int $options, $openedPath)

Opens stream in selected mode.

false|integer
stream_write($data)

Writes data to stream.

bool
stream_stat()

Returns stat data for file inclusion. Currently disabled.

array|false
url_stat(string $path)

Returns file stat information

string|null
stream_read(int $bytes)

Reads and returns $bytes amount of bytes from stream.

bool
stream_eof()

Checks whether pointer has reached EOF.

bool
mkdir(string $path, int $mode, int $options)

Called in response to mkdir to create directory.

bool
stream_metadata(string $path, int $option, integer $value)

Called in response to chown/chgrp/touch/chmod etc.

bool
stream_seek(int $offset, int $whence = SEEK_SET)

Sets file pointer to specified position

bool
stream_truncate(int $newSize)

Truncates file to given size

bool
rename(string $oldname, string $newname)

Renames/Moves file

bool
unlink(int $path)

Deletes file at given path

bool
rmdir(string $path)

Removes directory

bool
dir_opendir(string $path)

Opens directory for iteration

bool
dir_closedir()

Closes opened dir

null
dir_readdir()

Returns next file url in directory

dir_rewinddir()

Resets directory iterator

stream_lock($operation)

No description

Details

at line 81
string stripScheme(string $path)

Returns path stripped of url scheme (http://, ftp://, test:// etc.)

Parameters

string $path

Return Value

string

at line 96
Container getContainerFromContext($path)

Returns Container object fished form defaultcontextoptions by scheme.

Parameters

$path

Return Value

Container

at line 109
int stream_tell()

Return Value

int

See also

http://php.net/streamwrapper.stream-tell

at line 119
void stream_close()

Return Value

void

See also

http://php.net/streamwrapper.stream-close

at line 138
bool stream_open(string $path, int $mode, int $options, $openedPath)

Opens stream in selected mode.

Parameters

string $path
int $mode
int $options
$openedPath

Return Value

bool

Exceptions

NotDirectoryException
NotFoundException

See also

http://php.net/streamwrapper.stream-open

at line 239
false|integer stream_write($data)

Writes data to stream.

Parameters

$data

Return Value

false|integer

See also

http://php.net/streamwrapper.stream-write

at line 258
bool stream_stat()

Returns stat data for file inclusion. Currently disabled.

Return Value

bool

See also

http://php.net/streamwrapper.stream-stat

at line 272
array|false url_stat(string $path)

Returns file stat information

Parameters

string $path

Return Value

array|false

See also

http://php.net/stat

at line 300
string|null stream_read(int $bytes)

Reads and returns $bytes amount of bytes from stream.

Parameters

int $bytes

Return Value

string|null

See also

http://php.net/streamwrapper.stream-read

at line 319
bool stream_eof()

Checks whether pointer has reached EOF.

Return Value

bool

See also

http://php.net/streamwrapper.stream-eof

at line 335
bool mkdir(string $path, int $mode, int $options)

Called in response to mkdir to create directory.

Parameters

string $path
int $mode
int $options

Return Value

bool

See also

http://php.net/streamwrapper.mkdir

at line 385
bool stream_metadata(string $path, int $option, integer $value)

Called in response to chown/chgrp/touch/chmod etc.

Parameters

string $path
int $option
integer $value

Return Value

bool

See also

http://php.net/streamwrapper.stream-metadata

at line 522
bool stream_seek(int $offset, int $whence = SEEK_SET)

Sets file pointer to specified position

Parameters

int $offset
int $whence

Return Value

bool

at line 546
bool stream_truncate(int $newSize)

Truncates file to given size

Parameters

int $newSize

Return Value

bool

at line 562
bool rename(string $oldname, string $newname)

Renames/Moves file

Parameters

string $oldname
string $newname

Return Value

bool

Deletes file at given path

Parameters

int $path

Return Value

bool

at line 643
bool rmdir(string $path)

Removes directory

Parameters

string $path

Return Value

bool

at line 700
bool dir_opendir(string $path)

Opens directory for iteration

Parameters

string $path

Return Value

bool

at line 741
bool dir_closedir()

Closes opened dir

Return Value

bool

at line 757
null dir_readdir()

Returns next file url in directory

Return Value

null

at line 771
dir_rewinddir()

Resets directory iterator

at line 776
stream_lock($operation)

Parameters

$operation