BackupStorageService
in package
Manages backup file storage using the same adapter pattern as DocumentService.
Stores backups in a backups/ prefix within the configured storage backend.
Table of Contents
Properties
- $adapter : string
- $filesystem : Filesystem
Methods
- __construct() : mixed
- Constructor.
- delete() : void
- Delete a backup file from storage.
- exists() : bool
- Check if a backup file exists.
- getAdapterType() : string
- Get the active storage adapter type.
- listFiles() : array<string|int, string>
- List all backup files.
- read() : string
- Read a backup file from storage.
- write() : void
- Write a backup file to storage.
- initializeFilesystem() : void
- Initialize filesystem.
- initializeLocalAdapter() : void
- Initialize local adapter.
Properties
$adapter
private
string
$adapter
$filesystem
private
Filesystem
$filesystem
Methods
__construct()
Constructor.
public
__construct() : mixed
delete()
Delete a backup file from storage.
public
delete(string $filename) : void
Parameters
- $filename : string
exists()
Check if a backup file exists.
public
exists(string $filename) : bool
Parameters
- $filename : string
Return values
boolgetAdapterType()
Get the active storage adapter type.
public
getAdapterType() : string
Return values
stringlistFiles()
List all backup files.
public
listFiles() : array<string|int, string>
Return values
array<string|int, string> —Filenames
read()
Read a backup file from storage.
public
read(string $filename) : string
Parameters
- $filename : string
Return values
stringwrite()
Write a backup file to storage.
public
write(string $filename, string $data) : void
Parameters
- $filename : string
- $data : string
initializeFilesystem()
Initialize filesystem.
private
initializeFilesystem() : void
initializeLocalAdapter()
Initialize local adapter.
private
initializeLocalAdapter() : void