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.

int
stream_write($data)

Writes data to stream.

bool
stream_stat()

Returns stat data for file inclusion. Currently disabled.

array|bool
url_stat(string $path)

Returns file stat information

string
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 78
string stripScheme(string $path)

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

Parameters

string $path

Return Value

string

at line 93
Container getContainerFromContext($path)

Returns Container object fished form defaultcontextoptions by scheme.

Parameters

$path

Return Value

Container

at line 106
int stream_tell()

Return Value

int

See also

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

at line 116
void stream_close()

Return Value

void

See also

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

at line 135
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 236
int stream_write($data)

Writes data to stream.

Parameters

$data

Return Value

int

See also

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

at line 255
bool stream_stat()

Returns stat data for file inclusion. Currently disabled.

Return Value

bool

See also

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

at line 269
array|bool url_stat(string $path)

Returns file stat information

Parameters

string $path

Return Value

array|bool

See also

http://php.net/stat

at line 296
string stream_read(int $bytes)

Reads and returns $bytes amount of bytes from stream.

Parameters

int $bytes

Return Value

string

See also

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

at line 315
bool stream_eof()

Checks whether pointer has reached EOF.

Return Value

bool

See also

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

at line 331
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 381
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 518
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 542
bool stream_truncate(int $newSize)

Truncates file to given size

Parameters

int $newSize

Return Value

bool

at line 558
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 639
bool rmdir(string $path)

Removes directory

Parameters

string $path

Return Value

bool

at line 696
bool dir_opendir(string $path)

Opens directory for iteration

Parameters

string $path

Return Value

bool

at line 737
bool dir_closedir()

Closes opened dir

Return Value

bool

at line 753
null dir_readdir()

Returns next file url in directory

Return Value

null

at line 767
dir_rewinddir()

Resets directory iterator

at line 772
stream_lock($operation)

Parameters

$operation