|
| | isExists ($path) |
| |
| | stat ($path) |
| |
| | isReadable ($path) |
| |
| | isFile ($path) |
| |
| | isDirectory ($path) |
| |
| | fileGetContents ($path, $flag=null, $context=null) |
| |
| | isWritable ($path) |
| |
| | getParentDirectory ($path) |
| |
| | createDirectory ($path, $permissions=0777) |
| |
| | readDirectory ($path) |
| |
| | readDirectoryRecursively ($path=null) |
| |
| | search ($pattern, $path) |
| |
| | rename ($oldPath, $newPath, DriverInterface $targetDriver=null) |
| |
| | copy ($source, $destination, DriverInterface $targetDriver=null) |
| |
| | symlink ($source, $destination, DriverInterface $targetDriver=null) |
| |
| | deleteFile ($path) |
| |
| | deleteDirectory ($path) |
| |
| | changePermissions ($path, $permissions) |
| |
| | changePermissionsRecursively ($path, $dirPermissions, $filePermissions) |
| |
| | touch ($path, $modificationTime=null) |
| |
| | filePutContents ($path, $content, $mode=null) |
| |
| | fileOpen ($path, $mode) |
| |
| | fileReadLine ($resource, $length, $ending=null) |
| |
| | fileRead ($resource, $length) |
| |
| | fileGetCsv ($resource, $length=0, $delimiter=',', $enclosure='"', $escape = '\\') |
| |
| | fileTell ($resource) |
| |
| | fileSeek ($resource, $offset, $whence=SEEK_SET) |
| |
| | endOfFile ($resource) |
| |
| | fileClose ($resource) |
| |
| | fileWrite ($resource, $data) |
| |
| | filePutCsv ($resource, array $data, $delimiter=',', $enclosure='"') |
| |
| | fileFlush ($resource) |
| |
| | fileLock ($resource, $lockMode=LOCK_EX) |
| |
| | fileUnlock ($resource) |
| |
| | getAbsolutePath ($basePath, $path, $scheme=null) |
| |
| | getRealPath ($path) |
| |
| | getRealPathSafety ($path) |
| |
| | getRelativePath ($basePath, $path=null) |
| |
Class Driver
@api
- Since
- 100.0.2
Definition at line 18 of file DriverInterface.php.
◆ changePermissions()
| changePermissions |
( |
|
$path, |
|
|
|
$permissions |
|
) |
| |
Change permissions of given path
- Parameters
-
| string | $path | |
| int | $permissions | |
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ changePermissionsRecursively()
| changePermissionsRecursively |
( |
|
$path, |
|
|
|
$dirPermissions, |
|
|
|
$filePermissions |
|
) |
| |
Recursively hange permissions of given path
- Parameters
-
| string | $path | |
| int | $dirPermissions | |
| int | $filePermissions | |
- Returns
- bool
- Exceptions
-
◆ copy()
Copy source into destination
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ createDirectory()
| createDirectory |
( |
|
$path, |
|
|
|
$permissions = 0777 |
|
) |
| |
Create directory
- Parameters
-
| string | $path | |
| int | $permissions | |
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ deleteDirectory()
Delete directory
- Parameters
-
- Returns
- bool
- Exceptions
-
◆ deleteFile()
Delete file
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ endOfFile()
Returns true if pointer at the end of file or in case of exception
- Parameters
-
- Returns
- boolean
Implemented in File.
◆ fileClose()
Close file
- Parameters
-
- Returns
- boolean
- Exceptions
-
Implemented in File.
◆ fileFlush()
Flushes the output
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ fileGetContents()
| fileGetContents |
( |
|
$path, |
|
|
|
$flag = null, |
|
|
|
$context = null |
|
) |
| |
Retrieve file contents from given path
- Parameters
-
| string | $path | |
| string | null | $flag | |
| resource | null | $context | |
- Returns
- string
- Exceptions
-
Implemented in File, and Http.
◆ fileGetCsv()
| fileGetCsv |
( |
|
$resource, |
|
|
|
$length = 0, |
|
|
|
$delimiter = ',', |
|
|
|
$enclosure = '"', |
|
|
|
$escape = '\\' |
|
) |
| |
Reads one CSV row from the file
- Parameters
-
| resource | $resource | |
| int | $length | [optional] |
| string | $delimiter | [optional] |
| string | $enclosure | [optional] |
| string | $escape | [optional] |
- Returns
- array|bool|null
- Exceptions
-
Implemented in File.
◆ fileLock()
| fileLock |
( |
|
$resource, |
|
|
|
$lockMode = LOCK_EX |
|
) |
| |
Lock file in selected mode
- Parameters
-
| resource | $resource | |
| int | $lockMode | |
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ fileOpen()
| fileOpen |
( |
|
$path, |
|
|
|
$mode |
|
) |
| |
Open file
- Parameters
-
- Returns
- resource
- Exceptions
-
Implemented in File, and Http.
◆ filePutContents()
| filePutContents |
( |
|
$path, |
|
|
|
$content, |
|
|
|
$mode = null |
|
) |
| |
Put contents into given file
- Parameters
-
| string | $path | |
| string | $content | |
| string | null | $mode | |
- Returns
- int The number of bytes that were written.
- Exceptions
-
Implemented in File.
◆ filePutCsv()
| filePutCsv |
( |
|
$resource, |
|
|
array |
$data, |
|
|
|
$delimiter = ',', |
|
|
|
$enclosure = '"' |
|
) |
| |
Writes one CSV row to the file.
- Parameters
-
| resource | $resource | |
| array | $data | |
| string | $delimiter | |
| string | $enclosure | |
- Returns
- int
- Exceptions
-
◆ fileRead()
| fileRead |
( |
|
$resource, |
|
|
|
$length |
|
) |
| |
Reads the specified number of bytes from the current position.
- Parameters
-
| resource | $resource | |
| int | $length | |
- Returns
- string
- Exceptions
-
Implemented in File.
◆ fileReadLine()
| fileReadLine |
( |
|
$resource, |
|
|
|
$length, |
|
|
|
$ending = null |
|
) |
| |
Reads the line content from file pointer (with specified number of bytes from the current position).
- Parameters
-
| resource | $resource | |
| int | $length | |
| string | $ending | [optional] |
- Returns
- string
- Exceptions
-
Implemented in File, and Http.
◆ fileSeek()
| fileSeek |
( |
|
$resource, |
|
|
|
$offset, |
|
|
|
$whence = SEEK_SET |
|
) |
| |
Seeks to the specified offset
- Parameters
-
| resource | $resource | |
| int | $offset | |
| int | $whence | |
- Returns
- int
- Exceptions
-
Implemented in File.
◆ fileTell()
Returns position of read/write pointer
- Parameters
-
- Returns
- int
- Exceptions
-
Implemented in File.
◆ fileUnlock()
Unlock file
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ fileWrite()
| fileWrite |
( |
|
$resource, |
|
|
|
$data |
|
) |
| |
Writes data to file
- Parameters
-
| resource | $resource | |
| string | $data | |
- Returns
- int
- Exceptions
-
Implemented in File.
◆ getAbsolutePath()
| getAbsolutePath |
( |
|
$basePath, |
|
|
|
$path, |
|
|
|
$scheme = null |
|
) |
| |
- Parameters
-
| string | $basePath | |
| string | $path | |
| string | null | $scheme | |
- Returns
- mixed
Implemented in File, and Http.
◆ getParentDirectory()
| getParentDirectory |
( |
|
$path | ) |
|
Returns parent directory's path
- Parameters
-
- Returns
- string
Implemented in File.
◆ getRealPath()
- Parameters
-
- Returns
- mixed
Implemented in File.
◆ getRealPathSafety()
| getRealPathSafety |
( |
|
$path | ) |
|
Return correct path for link
- Parameters
-
- Returns
- mixed
Implemented in File.
◆ getRelativePath()
| getRelativePath |
( |
|
$basePath, |
|
|
|
$path = null |
|
) |
| |
- Parameters
-
| string | $basePath | |
| null | $path | |
- Returns
- mixed
Implemented in File.
◆ isDirectory()
Tells whether the filename is a regular directory
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ isExists()
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File, and Http.
◆ isFile()
Tells whether the filename is a regular file
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ isReadable()
Check permissions for reading file or directory
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ isWritable()
Check if given path is writable
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ readDirectory()
Read directory
- Parameters
-
- Returns
- array
- Exceptions
-
◆ readDirectoryRecursively()
| readDirectoryRecursively |
( |
|
$path = null | ) |
|
Read directory recursively
- Parameters
-
- Returns
- array
- Exceptions
-
◆ rename()
Renames a file or directory
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ search()
| search |
( |
|
$pattern, |
|
|
|
$path |
|
) |
| |
Search paths by given regex
- Parameters
-
| string | $pattern | |
| string | $path | |
- Returns
- array
- Exceptions
-
Implemented in File.
◆ stat()
Gathers the statistics of the given path
- Parameters
-
- Returns
- array
- Exceptions
-
Implemented in File, and Http.
◆ symlink()
Create symlink on source and place it into destination
- Parameters
-
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ touch()
| touch |
( |
|
$path, |
|
|
|
$modificationTime = null |
|
) |
| |
Sets access and modification time of file.
- Parameters
-
| string | $path | |
| int | null | $modificationTime | |
- Returns
- bool
- Exceptions
-
Implemented in File.
◆ WRITEABLE_DIRECTORY_MODE
| const WRITEABLE_DIRECTORY_MODE = 0770 |
◆ WRITEABLE_FILE_MODE
| const WRITEABLE_FILE_MODE = 0660 |
The documentation for this interface was generated from the following file: