Define the contract for backend.
Refreshes the backend state.
public refresh(bool $reset): bool
| Parameter | Type | Description |
|---|
$reset | bool | |
public scandir(string $path, ?string $regexFilter, int $sort = 'SCANDIR_SORT_ASCENDING', bool $showHidden, ?string $relativePath, bool $): void
| Parameter | Type | Description |
|---|
$path | string | |
$regexFilter | string | |
$sort | int | |
$showHidden | bool | |
$relativePath | string | |
$ | bool | |
Updates the access and modification time of the file at the given path.
public touch(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Checks if the file or path exists.
public exists(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Returns the real path of the given file or directory.
public realpath(string $path): ?string
| Parameter | Type | Description |
|---|
$path | string | |
Checks if the file or directory is readable.
public isReadable(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Checks if the file or directory is writable.
public isWritable(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Checks if the path is a directory.
public isDir(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Checks if the path is a symbolic link.
public isLink(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Checks if the path is a regular file.
public isFile(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Returns the type of the file.
public filetype(string $path): string
| Parameter | Type | Description |
|---|
$path | string | |
Returns the creation time of the file.
public filectime(string $path): int
| Parameter | Type | Description |
|---|
$path | string | |
Returns the modification time of the file.
public filemtime(string $path): int
| Parameter | Type | Description |
|---|
$path | string | |
Returns the access time of the file.
public fileatime(string $path): int
| Parameter | Type | Description |
|---|
$path | string | |
Returns the size of the file in bytes.
public filesize(string $path): int
| Parameter | Type | Description |
|---|
$path | string | |
Returns the permissions of the file.
public fileperms(string $path): int
| Parameter | Type | Description |
|---|
$path | string | |
Changes the permissions of the file.
public chmod(string $path, int $mode): bool
| Parameter | Type | Description |
|---|
$path | string | |
$mode | int | |
Changes the owner of the file.
public chown(string $path, string $user): bool
| Parameter | Type | Description |
|---|
$path | string | |
$user | string | |
Changes the group of the file.
public chgrp(string $path, string $group): bool
| Parameter | Type | Description |
|---|
$path | string | |
$group | string | |
Deletes the file at the given path.
public unlink(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Returns the MIME content type of the file.
public mimeContentType(string $path): ?string
| Parameter | Type | Description |
|---|
$path | string | |
Returns the MD5 checksum of the file.
public md5Checksum(string $path): ?string
| Parameter | Type | Description |
|---|
$path | string | |
Gets the current working directory.
Creates a directory at the given path.
public mkdir(string $path): bool
| Parameter | Type | Description |
|---|
$path | string | |
Removes a directory at the given path.
public rmdir(string $path, bool $recurse): bool
| Parameter | Type | Description |
|---|
$path | string | |
$recurse | bool | |
Copies a file from source to destination.
public copy(string $src, string $dst, bool $overwrite): bool
| Parameter | Type | Description |
|---|
$src | string | |
$dst | string | |
$overwrite | bool | |
Moves a file from source to destination.
public move(string $src, string $dst): bool
| Parameter | Type | Description |
|---|
$src | string | |
$dst | string | |
Creates a link from source to destination.
public link(string $src, string $dst): bool
| Parameter | Type | Description |
|---|
$src | string | |
$dst | string | |
Reads the contents of a file.
public read(string $path, int $offset = -1, ?int $maxlen): string
| Parameter | Type | Description |
|---|
$path | string | |
$offset | int | |
$maxlen | int | |
Writes data to a file.
public write(string $path, string $bytes, ?string $contentType, bool $overwrite): ?int
| Parameter | Type | Description |
|---|
$path | string | |
$bytes | string | |
$contentType | string | |
$overwrite | bool | |
public find(?string $search, string $path = '/', bool $caseInsensitive, false $): void
| Parameter | Type | Description |
|---|
$search | string | |
$path | string | |
$caseInsensitive | bool | |
$ | false | |
Performs a filesystem check.
public fsck(bool $skipRoot_reload): bool
| Parameter | Type | Description |
|---|
$skipRoot_reload | bool | |
Upload a file that was uploaded with a POST.
public upload(string $path, array $file, bool $overwrite): bool
| Parameter | Type | Description |
|---|
$path | string | |
$file | array | |
$overwrite | bool | |
public setMeta(string $path, array $values): bool
| Parameter | Type | Description |
|---|
$path | string | |
$values | array | |
public getMeta(string $path, ?string $key, string $): void
| Parameter | Type | Description |
|---|
$path | string | |
$key | string | |
$ | string | |
public previewURL(string $path, array $params): string
| Parameter | Type | Description |
|---|
$path | string | |
$params | array | |
Direct u r l.
public directURL(string $path): string
| Parameter | Type | Description |
|---|
$path | string | |
public thumbnailURL(string $path, int $width = 100, int $height = 100, string $format = 'jpeg', array $params): string
| Parameter | Type | Description |
|---|
$path | string | |
$width | int | |
$height | int | |
$format | string | |
$params | array | |
Authorises the backend, optionally with a redirect URI.
public authorise(?string $redirectUri): bool
| Parameter | Type | Description |
|---|
$redirectUri | string | |
Authorises the backend using an authorization code.
public authoriseWithCode(string $code, ?string $redirectUri, string $grantType = 'authorization_code'): bool
| Parameter | Type | Description |
|---|
$code | string | |
$redirectUri | string | |
$grantType | string | |
Checks if the backend is authorised.
public authorised(): bool
Builds the authorisation URL for the backend.
public buildAuthURL(?string $callbackUrl): ?string
| Parameter | Type | Description |
|---|
$callbackUrl | string | |
Opens a stream to the file at the given path.
public openStream(string $path, string $mode): mixed
| Parameter | Type | Description |
|---|
$path | string | |
$mode | string | |
Writes data to a stream.
public writeStream(mixed $stream, string $bytes, ?int $length): int
| Parameter | Type | Description |
|---|
$stream | mixed | |
$bytes | string | |
$length | int | |
Reads data from a stream.
public readStream(mixed $stream, int $length): string
| Parameter | Type | Description |
|---|
$stream | mixed | |
$length | int | |
Seeks to a position in a stream.
public seekStream(mixed $stream, int $offset, int $whence = 'SEEK_SET'): int
| Parameter | Type | Description |
|---|
$stream | mixed | |
$offset | int | |
$whence | int | |
Returns the current position in a stream.
public tellStream(mixed $stream): int
| Parameter | Type | Description |
|---|
$stream | mixed | |
Checks if the stream is at end-of-file.
public eofStream(mixed $stream): bool
| Parameter | Type | Description |
|---|
$stream | mixed | |
Truncates a stream to the given size.
public truncateStream(mixed $stream, int $size): bool
| Parameter | Type | Description |
|---|
$stream | mixed | |
$size | int | |
Locks a stream for reading or writing.
public lockStream(mixed $stream, int $operation, ?int $wouldblock): bool
| Parameter | Type | Description |
|---|
$stream | mixed | |
$operation | int | |
$wouldblock | int | |
Flushes the output of a stream.
public flushStream(mixed $stream): bool
| Parameter | Type | Description |
|---|
$stream | mixed | |
Gets a line from a stream.
public getsStream(mixed $stream, ?int $length): string
| Parameter | Type | Description |
|---|
$stream | mixed | |
$length | int | |
Closes a stream.
public closeStream(mixed $stream): bool
| Parameter | Type | Description |
|---|
$stream | mixed | |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000