WebDAV
WebDAV
Represent web d a v.
class WebDAV extends \Hazaar\HTTP\WebDAV implements \Hazaar\File\Interface\Backend , \Hazaar\File\Interface\DriverExtends: Hazaar\HTTP\WebDAV
Implements: Hazaar\File\Interface\Backend, Hazaar\File\Interface\Driver
Properties
separator
Store the separator.
public string $separator = '/'Type: string
manager
Store the manager.
protected Manager $managerType: Hazaar\File\Manager
options
private Options $optionsType: Hazaar\File\Backend\WebDAV\Options
cache
Store the cache.
private Adapter $cacheType: Hazaar\Cache\Adapter
meta
private array $metaType: array
Methods
__construct
WebDAV constructor.
public __construct(array|Options $options): voidParameters
| Parameter | Type | Description |
|---|---|---|
$options | array | Hazaar\File\Backend\WebDAV\Options |
__destruct
Clean up resources before destruction.
public __destruct(): voidlabel
Return the human-readable label for this backend implementation.
public label(): stringReturns: string
refresh
Refresh the remote authorization token used by this backend.
public refresh(bool $reset = true): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$reset | bool |
scandir
List directory entries for a path in backend storage.
public scandir(string $path, ?string $regexFilter, int $sort = 'SCANDIR_SORT_ASCENDING', bool $showHidden, ?string $relativePath): array|boolReturns: array|bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$regexFilter | string | |
$sort | int | |
$showHidden | bool | |
$relativePath | string |
exists
Determine whether a path exists in backend storage.
public exists(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
realpath
Resolve a logical backend path to its canonical remote representation.
public realpath(string $path): ?stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
isReadable
Check whether the instance readable.
public isReadable(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
isWritable
Check whether the instance writable.
public isWritable(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
isDir
Check whether the instance dir.
public isDir(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
isLink
Check whether the instance link.
public isLink(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
isFile
Check whether the instance file.
public isFile(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
filetype
Return the file type for a backend path.
public filetype(string $path): false|stringReturns: false|string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
filectime
Return the creation timestamp for a backend path.
public filectime(string $path): false|intReturns: false|int
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
filemtime
Return the last-modified timestamp for a backend path.
public filemtime(string $path): false|intReturns: false|int
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
touch
Create a file or update modification time for a backend path.
public touch(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
fileatime
Return the last-access timestamp for a backend path.
public fileatime(string $path): false|intReturns: false|int
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
filesize
Return the file size in bytes for a backend path.
public filesize(string $path): false|intReturns: false|int
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
fileperms
Return permission metadata for a backend path when available.
public fileperms(string $path): false|intReturns: false|int
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
chmod
Update permission metadata for a backend path when supported.
public chmod(string $path, int $mode): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$mode | int |
chown
Update owner metadata for a backend path when supported.
public chown(string $path, string $user): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$user | string |
chgrp
Update group metadata for a backend path when supported.
public chgrp(string $path, string $group): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$group | string |
cwd
Return the current working directory for this backend.
public cwd(): stringReturns: string
unlink
Delete a file at the supplied backend path.
public unlink(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
mimeContentType
Mime content type.
public mimeContentType(string $path): ?stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
md5Checksum
Md5 checksum.
public md5Checksum(string $path): ?stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
thumbnailURL
Get the URL to a thumbnail of the file.
public thumbnailURL(string $path, int $width = 100, int $height = 100, string $format = 'jpeg', array $params): false|stringReturns: false|string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$width | int | |
$height | int | |
$format | string | |
$params | array |
mkdir
Create a directory at the supplied backend path.
public mkdir(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
rmdir
Remove a directory at the supplied backend path.
public rmdir(string $path, bool $recurse): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$recurse | bool |
copy
Copy a file or directory within backend storage.
public copy(string $src, string $dst, bool $overwrite): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$src | string | |
$dst | string | |
$overwrite | bool |
link
Create a link or alias to a backend object when supported.
public link(string $src, string $dst): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$src | string | |
$dst | string |
move
Move or rename a backend object.
public move(string $src, string $dst, bool $overwrite): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$src | string | |
$dst | string | |
$overwrite | bool |
read
Read and return file contents from backend storage.
public read(string $path, int $offset = -1, ?int $maxlen): false|stringReturns: false|string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$offset | int | |
$maxlen | int |
write
Write content to a backend path and return bytes written.
public write(string $path, string $data, ?string $contentType, bool $overwrite): ?intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$data | string | |
$contentType | string | |
$overwrite | bool |
upload
Upload a file that was uploaded with a POST.
public upload(string $path, array $file, bool $overwrite = true): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$file | array | |
$overwrite | bool |
getMeta
Get the meta.
public getMeta(string $path, ?string $key): array|false|stringReturns: array|false|string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$key | string |
setMeta
public setMeta(string $path, array $values): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$values | array |
previewURL
public previewURL(string $path, array $params): false|stringReturns: false|string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$params | array |
directURL
Direct u r l.
public directURL(string $path): false|stringReturns: false|string
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
authorised
Check whether this backend currently has valid authorization credentials.
public authorised(): boolReturns: bool
authorise
Run the authorization flow required by the remote backend service.
public authorise(?string $redirectUri): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$redirectUri | string |
authoriseWithCode
Authorise with code.
public authoriseWithCode(string $code, ?string $redirectUri, string $grantType = 'authorization_code', array $options): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$code | string | |
$redirectUri | string | |
$grantType | string | |
$options | array |
buildAuthURL
Build auth u r l.
public buildAuthURL(?string $callbackUrl): ?stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$callbackUrl | string |
openStream
Open stream.
public openStream(string $path, string $mode): mixedReturns: mixed
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$mode | string |
writeStream
public writeStream(resource $stream, string $bytes, ?int $length): intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | resource | |
$bytes | string | |
$length | int |
readStream
public readStream(resource $stream, int $length): false|stringReturns: false|string
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | resource | |
$length | int |
seekStream
public seekStream(mixed $stream, int $offset, int $whence = 'SEEK_SET'): intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | mixed | |
$offset | int | |
$whence | int |
tellStream
public tellStream(mixed $stream): intReturns: int
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | mixed |
eofStream
public eofStream(mixed $stream): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | mixed |
truncateStream
public truncateStream(mixed $stream, int $size): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | mixed | |
$size | int |
lockStream
public lockStream(mixed $stream, int $operation, ?int $wouldblock): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | mixed | |
$operation | int | |
$wouldblock | int |
flushStream
public flushStream(mixed $stream): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | mixed |
getsStream
public getsStream(mixed $stream, ?int $length): false|stringReturns: false|string
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | mixed | |
$length | int |
closeStream
public closeStream(resource $stream): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$stream | resource |
find
Search backend storage for entries matching the supplied pattern.
public find(?string $search, string $path = '/', bool $caseInsensitive): array|falseReturns: array|false
Parameters
| Parameter | Type | Description |
|---|---|---|
$search | string | |
$path | string | |
$caseInsensitive | bool |
fsck
Run a backend consistency check and return diagnostic results.
public fsck(bool $skipRoot_reload): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$skipRoot_reload | bool |
info
private info(string $path, bool $forceUpdate): array|falseReturns: array|false
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string | |
$forceUpdate | bool |
updateMeta
Update meta.
private updateMeta(string $path): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$path | string |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:17 +0000