added method needsPartFile() in Storage
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
This commit is contained in:
parent
8adf617726
commit
13e50cbcd7
|
@ -505,9 +505,9 @@ class File extends Node implements IFile {
|
||||||
*/
|
*/
|
||||||
private function needsPartFile($storage) {
|
private function needsPartFile($storage) {
|
||||||
// TODO: in the future use ChunkHandler provided by storage
|
// TODO: in the future use ChunkHandler provided by storage
|
||||||
// and/or add method on Storage called "needsPartFile()"
|
|
||||||
return !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') &&
|
return !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') &&
|
||||||
!$storage->instanceOfStorage('OC\Files\Storage\OwnCloud');
|
!$storage->instanceOfStorage('OC\Files\Storage\OwnCloud') &&
|
||||||
|
$storage->needsPartFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -711,4 +711,11 @@ abstract class Common implements Storage, ILockingStorage {
|
||||||
public function setAvailability($isAvailable) {
|
public function setAvailability($isAvailable) {
|
||||||
$this->getStorageCache()->setAvailability($isAvailable);
|
$this->getStorageCache()->setAvailability($isAvailable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function needsPartFile() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -610,4 +610,11 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage {
|
||||||
$this->getWrapperStorage()->changeLock($path, $type, $provider);
|
$this->getWrapperStorage()->changeLock($path, $type, $provider);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function needsPartFile() {
|
||||||
|
return $this->getWrapperStorage()->needsPartFile();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -457,4 +457,6 @@ interface Storage extends IStorage {
|
||||||
* @param bool $isAvailable
|
* @param bool $isAvailable
|
||||||
*/
|
*/
|
||||||
public function setAvailability($isAvailable);
|
public function setAvailability($isAvailable);
|
||||||
|
|
||||||
|
public function needsPartFile();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue