Omeka_Storage_Adapter_Filesystem
Package: Storage\Adapter
- class Omeka_Storage_Adapter_Filesystem
implements Omeka_Storage_Adapter_AdapterInterface
Standard local filesystem storage adapter.
The default adapter; this stores files in the Omeka files directory by default, but can be set to point to a different path.
- property Omeka_Storage_Adapter_Filesystem::$_localDir
protected string
Local directory where files are stored.
- property Omeka_Storage_Adapter_Filesystem::$_subDirs
protected
- property Omeka_Storage_Adapter_Filesystem::$_webDir
protected string
Web-accesible path that corresponds to $_localDir.
- Omeka_Storage_Adapter_Filesystem::__construct($options = array())
Set options for the storage adapter.
- Parameters:
$options (
array
) –
- Omeka_Storage_Adapter_Filesystem::setUp()
- Omeka_Storage_Adapter_Filesystem::canStore()
Check whether the adapter is set up correctly to be able to store files.
Specifically, this checks to see if the local storage directory is writable.
- Returns:
bool
- Omeka_Storage_Adapter_Filesystem::store($source, $dest)
Move a local file to “storage.”
- Parameters:
$source (
string
) – Local filesystem path to file.$dest (
string
) – Destination path.
- Omeka_Storage_Adapter_Filesystem::move($source, $dest)
Move a file between two “storage” locations.
- Parameters:
$source (
string
) – Original stored path.$dest (
string
) – Destination stored path.
- Omeka_Storage_Adapter_Filesystem::delete($path)
Remove a “stored” file.
- Parameters:
$path (
string
) –
- Omeka_Storage_Adapter_Filesystem::getUri($path)
Get a URI for a “stored” file.
- Parameters:
$path (
string
) –- Returns:
string URI
- Omeka_Storage_Adapter_Filesystem::getOptions()
Return the options set by the adapter. Used primarily for testing.
- Omeka_Storage_Adapter_Filesystem::setLocalDir($dir)
Set the path of the local directory where files are stored.
- Parameters:
$dir –
- Omeka_Storage_Adapter_Filesystem::setWebDir($dir)
Set the web URL that corresponds with the local dir.
- Parameters:
$dir –
- Omeka_Storage_Adapter_Filesystem::_getAbsPath($path)
Convert a “storage” path to an absolute filesystem path.
- Parameters:
$path (
string
) – Storage path.- Returns:
string Absolute local filesystem path.
- Omeka_Storage_Adapter_Filesystem::_rename($source, $dest)
- Parameters:
$source –
$dest –
- Returns:
bool