2014-06-18 00:06:56 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace OCP\Files\ObjectStore;
|
|
|
|
|
|
|
|
interface IObjectStore {
|
|
|
|
|
2014-06-18 17:20:26 +04:00
|
|
|
/**
|
|
|
|
* @return string the container or bucket name where objects are stored
|
|
|
|
*/
|
|
|
|
function getStorageId();
|
|
|
|
|
2014-06-18 00:06:56 +04:00
|
|
|
/**
|
|
|
|
* @param string $urn the unified resource name used to identify the object
|
|
|
|
* @param string $tmpFile path to the local temporary file that should be
|
|
|
|
* used to store the object
|
|
|
|
* @return void
|
|
|
|
* @throws Exception when something goes wrong, message will be logged
|
|
|
|
*/
|
|
|
|
function getObject($urn, $tmpFile);
|
2014-06-18 17:20:26 +04:00
|
|
|
|
2014-06-18 00:06:56 +04:00
|
|
|
/**
|
|
|
|
* @param string $urn the unified resource name used to identify the object
|
|
|
|
* @param string $tmpFile path to the local temporary file that the object
|
|
|
|
* should be loaded from
|
|
|
|
* @return void
|
|
|
|
* @throws Exception when something goes wrong, message will be logged
|
|
|
|
*/
|
2014-06-18 17:20:26 +04:00
|
|
|
function writeObject($urn, $tmpFile = null);
|
2014-06-18 00:06:56 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $urn the unified resource name used to identify the object
|
|
|
|
* @return void
|
|
|
|
* @throws Exception when something goes wrong, message will be logged
|
|
|
|
*/
|
|
|
|
function deleteObject($urn);
|
|
|
|
|
|
|
|
}
|