Storage
class Storage implements StorageInterface
Storage module class
Constants
ROOT_FILESYSTEM_NAME |
|
USER_FILESYSTEM_NAME |
|
RECYCLE_BIN_PATH |
|
Properties
protected array | $systemDir | System directories | |
protected array | $localFilesystems | Local filesystem names |
Methods
Constructor
Install module
Boot module
Mount local filesystem
Mount filesystem
Mount filesystem
Get filesystem
Get full file path
Get directory contents
Return true if directory is empty
Write files
Write file stream
Update files
Update files using a stream
Read file
Read file as a stream
Delete all files in direcotry (recursive)
Move all files (recursive)
Delete file from storage folder
Rename files
Delete directory in storage folder
Create directory in storage folder
Return true if file exist
Copy files
Move file
Get file info
Return true if file is directory
Get Mimetypes
Get file size
Get Mount Manager
Get sytem directories
Return true if path is system dir
Return true if filesystem is local
Get root filesystem name
Get recycle bin path
Get pubic path
Details
at line 59
__construct()
Constructor
at line 70
bool
install()
Install module
at line 87
void
boot()
Boot module
at line 100
MountManager|false
mountLocal(string $name, string|null $path = null)
Mount local filesystem
at line 115
MountManager|false
mount(string $name, object|string $adapter)
Mount filesystem
at line 132
bool
mountFilesystem(string $name, Filesystem $filesystem)
Mount filesystem
at line 143
object
get(string $name)
Get filesystem
at line 155
string
getFullPath(string $path = '', string|null $fileSystemName = null)
Get full file path
at line 168
array|false
listContents(string $path = '', bool $recursive = false, string|null $fileSystemName = null)
Get directory contents
at line 180
bool
isEmpty(string $path, string|null $fileSystemName = null)
Return true if directory is empty
at line 194
bool
write(string $path, string $contents, array $config = [], string|null $fileSystemName = null)
Write files
at line 214
bool
writeStream(string $path, resource $resource, array $config = [], string|null $fileSystemName = null)
Write file stream
at line 234
bool
update(string $path, string $contents, array $config = [], string|null $fileSystemName = null)
Update files
at line 248
bool
updateStream(string $path, $resource, $config = [], string|null $fileSystemName = null)
Update files using a stream
at line 260
string|false
read(string $path, string|null $fileSystemName = null)
Read file
at line 272
resource|false
readStream(string $path, string|null $fileSystemName = null)
Read file as a stream
at line 284
void
deleteFiles(string $path, string|null $fileSystemName = null)
Delete all files in direcotry (recursive)
at line 310
void
moveFiles(string $from, string $to, string|null $fileSystemName = null)
Move all files (recursive)
at line 328
boolean
delete(string $path, string|null $fileSystemName = null)
Delete file from storage folder
at line 341
boolean
rename(string $from, string $to, string|null $fileSystemName = null)
Rename files
at line 353
boolean
deleteDir(string $path, string|null $fileSystemName = null)
Delete directory in storage folder
at line 365
boolean
createDir(string $path, string|null $fileSystemName = null)
Create directory in storage folder
at line 377
boolean
has(string $path, string|null $fileSystemName = null)
Return true if file exist
at line 390
void
copy(string $from, string $to, string|null $fileSystemName = null)
Copy files
at line 403
boolean
moveFile(string $from, string $to, string|null $fileSystemName = null)
Move file
at line 422
array
getMetadata(string $path, string|null $fileSystemName = null)
Get file info
at line 434
boolean
isDir(string $path, string|null $fileSystemName = null)
Return true if file is directory
at line 453
string
getMimetype(string $path, string|null $fileSystemName = null)
Get Mimetypes
at line 465
integer|false
getSize(string $path, string|null $fileSystemName = null)
Get file size
at line 475
MountManager
manager()
Get Mount Manager
at line 485
array
getSystemDirectories()
Get sytem directories
at line 497
boolean
isSystemDir(string $path, string|null $fileSystemName = null)
Return true if path is system dir
at line 510
boolean
isLocalFilesystem(string|null $name)
Return true if filesystem is local
at line 524
string
getRootFilesystemName()
Get root filesystem name
at line 534
string
getRecyleBinPath()
Get recycle bin path
at line 545
string
getPublicPath(bool $relative = false)
Get pubic path