Backend
About 3 min
Backend
- Full name:
\Hazaar\File\Backend\Interfaces\Backend
Methods
refresh
public refresh(bool $reset = false): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$reset | bool |
scandir
public scandir(string $path, ?string $regex_filter = null, int $sort = SCANDIR_SORT_ASCENDING, bool $show_hidden = false, ?string $relative_path = null): string[]|bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$regex_filter | ?string | |
$sort | int | |
$show_hidden | bool | |
$relative_path | ?string |
touch
public touch(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
exists
public exists(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
realpath
public realpath(string $path): ?string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
isReadable
public isReadable(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
isWritable
public isWritable(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
isDir
public isDir(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
isLink
public isLink(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
isFile
public isFile(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
filetype
public filetype(string $path): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
filectime
public filectime(string $path): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
filemtime
public filemtime(string $path): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
fileatime
public fileatime(string $path): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
filesize
public filesize(string $path): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
fileperms
public fileperms(string $path): false|int
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
chmod
public chmod(string $path, int $mode): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$mode | int |
chown
public chown(string $path, string $user): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$user | string |
chgrp
public chgrp(string $path, string $group): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$group | string |
unlink
public unlink(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
mimeContentType
public mimeContentType(string $path): ?string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
md5Checksum
public md5Checksum(string $path): ?string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
cwd
public cwd(): string
mkdir
public mkdir(string $path): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
rmdir
public rmdir(string $path, bool $recurse = false): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$recurse | bool |
copy
public copy(string $src, string $dst, bool $recursive = false): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$src | string | |
$dst | string | |
$recursive | bool |
move
public move(string $src, string $dst): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$src | string | |
$dst | string |
link
public link(string $src, string $dst): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$src | string | |
$dst | string |
read
public read(string $path, int $offset = -1, ?int $maxlen = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$offset | int | |
$maxlen | ?int |
write
public write(string $path, string $bytes, ?string $content_type = null, bool $overwrite = false): ?int
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$bytes | string | |
$content_type | ?string | |
$overwrite | bool |
upload
Upload a file that was uploaded with a POST.
public upload(string $path, string[] $file, bool $overwrite = false): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$file | string[] | |
$overwrite | bool |
setMeta
public setMeta(string $path, array $values): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$values | array |
getMeta
public getMeta(string $path, ?string $key = null): array|false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$key | ?string |
previewURL
public previewURL(string $path, array<string,int|string> $params = []): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$params | array<string,int|string> |
directURL
public directURL(string $path): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string |
thumbnailURL
public thumbnailURL(string $path, int $width = 100, int $height = 100, string $format = 'jpeg', array<string,int|string> $params = []): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$width | int | |
$height | int | |
$format | string | |
$params | array<string,int|string> |
authorise
public authorise(?string $redirect_uri = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$redirect_uri | ?string |
authorised
public authorised(): bool
buildAuthURL
public buildAuthURL(?string $callback_url = null): ?string
Parameters:
Parameter | Type | Description |
---|---|---|
$callback_url | ?string |
openStream
Direct stream read/write methods.
public openStream(string $path, string $mode): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$path | string | |
$mode | string |
writeStream
public writeStream(mixed $stream, string $bytes, ?int $length = null): int
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed | |
$bytes | string | |
$length | ?int |
readStream
public readStream(mixed $stream, int $length): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed | |
$length | int |
seekStream
public seekStream(mixed $stream, int $offset, int $whence = SEEK_SET): int
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed | |
$offset | int | |
$whence | int |
tellStream
public tellStream(mixed $stream): int|false
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed |
eofStream
public eofStream(mixed $stream): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed |
truncateStream
public truncateStream(mixed $stream, int $size): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed | |
$size | int |
lockStream
public lockStream(mixed $stream, int $operation, ?int& $wouldblock = null): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed | |
$operation | int | |
$wouldblock | ?int |
flushStream
public flushStream(mixed $stream): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed |
getsStream
public getsStream(mixed $stream, ?int $length = null): false|string
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed | |
$length | ?int |
closeStream
public closeStream(mixed $stream): bool
Parameters:
Parameter | Type | Description |
---|---|---|
$stream | mixed |
Automatically generated on 2024-11-14