protected Backend $backend
protected Manager $manager
protected bool $allow_hidden
public string $relative_path
public __construct({Array})
Parameter | Type | Description |
---|
$path | string | |
$manager | Manager | |
$relative_path | string | |
public __toString({Array})
public getManager({Array})
Parameter | Type | Description |
---|
$values | array | |
Parameter | Type | Description |
---|
$key | string | |
Parameter | Type | Description |
---|
$suffix | string | |
Parameter | Type | Description |
---|
$suffix | string | |
Get the relative path of the directory.
public relativepath({Array})
If the file was returned from a [[Hazaar\File\Dir]] object, then it will have a stored relative path. Otherwise any file/path can be provided in the form of another [[Hazaar\File\ object, [[Hazaar\File\Dir]] object, or string path, and the relative path to the file will be returned.
Parameter | Type | Description |
---|
$path | string | |
public setRelativePath({Array})
Parameter | Type | Description |
---|
$path | string | |
public extension({Array})
Parameter | Type | Description |
---|
$filename | string | |
public isReadable({Array})
public isWritable({Array})
public allowHidden({Array})
Parameter | Type | Description |
---|
$toggle | bool | |
Parameter | Type | Description |
---|
$recursive | bool | |
Parameter | Type | Description |
---|
$newname | string | |
Delete the directory, optionally removing all it's contents.
Executing this method will simply delete or "unlink" the directory. Normally it must be empty to succeed. However specifying the $recursive parameter as TRUE will delete everything inside the directory, recursively (obviously).
Parameter | Type | Description |
---|
$recursive | bool | |
File::unlink() compatible delete that removes dir and all contents (ie: recursive).
Empty a directory of all it's contents.
This is the same as calling delete(true) except that the directory itself is not deleted.
By default hidden files are not deleted. This is for protection. You can choose to delete them as well by setting $include_hidden to true.
Parameter | Type | Description |
---|
$include_hidden | boolean | also delete hidden files |
Parameter | Type | Description |
---|
$regex_filter | string | |
Find files in the current path optionally recursing into sub directories.
Parameter | Type | Description |
---|
$pattern | string | The pattern to match against. This can be either a wildcard string, such as |
"*.txt" or a regex pattern. Regex is detected if the string is longer than a
single character and first character is the same as the last. |
| $show_hidden
| bool
| | | $case_sensitive
| bool
| if TRUE character case will be honoured | | $depth
| int
| Recursion depth. NULL will always recurse. 0 will prevent recursion. |
Parameter | Type | Description |
---|
$target | string | |
$recursive | bool | |
$transport_callback | \Closure | |
Parameter | Type | Description |
---|
$child | string | |
$force_dir | bool | |
Parameter | Type | Description |
---|
$path | string | |
public mimeContentType({Array})
Parameter | Type | Description |
---|
$child | string | |
Copy a file object into the current directory.
Parameter | Type | Description |
---|
$file | File | The file to put in this directory |
$overwrite | bool | |
Download a file from a URL directly to the directory and return a new File object.
This is useful for download large files as this method will write the file directly to storage. Currently, only local storage is supported as this uses OS file access.
Parameter | Type | Description |
---|
$source_url | mixed | The source URL of the file to download |
$timeout | int | The download timeout after which an exception will be thrown |
Parameter | Type | Description |
---|
$set_path | URL | |
Parameter | Type | Description |
---|
$source | Dir | |
$recursive | bool | |
$progress_callback | \Closure | |
$max_retries | int | |
Parameter | Type | Description |
---|
$file | string | |
$bytes | string | |
$content_type | string | |
private callSyncCallback({Array})
Generated by Hazaar API Doc Generator