File
in
Interface \Hoa\Stream\Wrapper\IWrapper\File.
Interface for “file stream wrapper” class.
Tags
Table of Contents
Methods
- dir_closedir() : bool
- Close directory handle.
- dir_opendir() : bool
- Open directory handle.
- dir_readdir() : mixed
- Read entry from directory handle.
- dir_rewinddir() : bool
- Rewind directory handle.
- mkdir() : bool
- Create a directory.
- rename() : bool
- Rename a file or directory.
- rmdir() : bool
- Remove a directory.
- unlink() : bool
- Delete a file.
- url_stat() : array<string|int, mixed>
- Retrieve information about a file.
Methods
dir_closedir()
Close directory handle.
public
dir_closedir() : bool
This method is called in to closedir(). Any resources which were locked, or allocated, during opening and use of the directory stream should be released.
Return values
booldir_opendir()
Open directory handle.
public
dir_opendir(string $path, int $options) : bool
This method is called in response to opendir().
Parameters
- $path : string
-
Specifies the URL that was passed to opendir().
- $options : int
-
Whether or not to enforce safe_mode (0x04).
Return values
booldir_readdir()
Read entry from directory handle.
public
dir_readdir() : mixed
This method is called in response to readdir().
dir_rewinddir()
Rewind directory handle.
public
dir_rewinddir() : bool
This method is called in response to rewinddir(). Should reset the output generated by self::dir_readdir, i.e. the next call to self::dir_readdir should return the first entry in the location returned by self::dir_opendir.
Return values
boolmkdir()
Create a directory.
public
mkdir(string $path, int $mode, int $options) : bool
This method is called in response to mkdir().
Parameters
- $path : string
-
Directory which should be created.
- $mode : int
-
The value passed to mkdir().
- $options : int
-
A bitwise mask of values.
Return values
boolrename()
Rename a file or directory.
public
rename(string $from, string $to) : bool
This method is called in response to rename(). Should attempt to rename $from to $to.
Parameters
- $from : string
-
The URL to current file.
- $to : string
-
The URL which $from should be renamed to.
Return values
boolrmdir()
Remove a directory.
public
rmdir(string $path, int $options) : bool
This method is called in response to rmdir().
Parameters
- $path : string
-
The directory URL which should be removed.
- $options : int
-
A bitwise mask of values.
Return values
boolunlink()
Delete a file.
public
unlink(string $path) : bool
This method is called in response to unlink().
Parameters
- $path : string
-
The file URL which should be deleted.
Return values
boolurl_stat()
Retrieve information about a file.
public
url_stat(string $path, int $flags) : array<string|int, mixed>
This method is called in response to all stat() related functions.
Parameters
- $path : string
-
The file URL which should be retrieve information about.
- $flags : int
-
Holds additional flags set by the streams API. It can hold one or more of the following values OR'd together. STREAM_URL_STAT_LINK: for resource with the ability to link to other resource (such as an HTTP location: forward, or a filesystem symlink). This flag specified that only information about the link itself should be returned, not the resource pointed to by the link. This flag is set in response to calls to lstat(), is_link(), or filetype(). STREAM_URL_STAT_QUIET: if this flag is set, our wrapper should not raise any errors. If this flag is not set, we are responsible for reporting errors using the trigger_error() function during stating of the path.