Class AbstractFileStorage
| category |
System |
|---|---|
| package |
Shared |
| subpackage |
Storage |
__construct(\WritableDirectory $storageDirectory)
_createAndReturnNewFilename(\FilenameStringType $existingFilename) : string
Checks whether the provided preferred filename already exists and generates one, with appending the next available number, which does not already exist.
| throws |
|---|
stringThe created filename
_validateFile(\ExistingFile $sourceFile) : \AbstractFileStorage
_validateFilename(\FilenameStringType $filename) : \AbstractFileStorage
deleteFile(\FilenameStringType $filename) : \AbstractFileStorage
Deletes an existing file.
\AbstractFileStorageSame instance for chained method calls.
fileExists(\FilenameStringType $filename) : boolean
Checks if the provided file exists.
boolean
importFile(\ExistingFile $sourceFile, \FilenameStringType $preferredFilename) : string
Saves an image to a writable directory.
| throws |
|---|
stringThe created filename
renameFile(\FilenameStringType $oldName, \FilenameStringType $newName) : \AbstractFileStorage
Renames an existing image file.
| throws |
If the file that should be renamed does not exists. If a file with the preferred name already exists. |
|---|
\AbstractFileStorageSame instance for chained method calls.