diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-02-24 12:21:48 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-02-24 12:21:48 +0100 |
commit | a23ef25010f8232c36337bb6b48c9a0bd7a59b40 (patch) | |
tree | e0e8b0032bf28013e25381497e05d9e9f6f40a95 /lib | |
parent | c465835e856601ccbe2643f690b0bc38ca5c3aa8 (diff) | |
download | nextcloud-server-a23ef25010f8232c36337bb6b48c9a0bd7a59b40.tar.gz nextcloud-server-a23ef25010f8232c36337bb6b48c9a0bd7a59b40.zip |
Removed unused deleteAll method on Common storage class
The "deleteAll" method on the Common storage class isn't used anywhere.
Also, it isn't defined on the Storage interface so this fix removes it
completely.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/storage/common.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index d4dca780ff3..9e826dd6192 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -140,43 +140,6 @@ abstract class Common implements \OC\Files\Storage\Storage { return $result; } - /** - * @brief Deletes all files and folders recursively within a directory - * @param string $directory The directory whose contents will be deleted - * @param bool $empty Flag indicating whether directory will be emptied - * @returns bool - * - * @note By default the directory specified by $directory will be - * deleted together with its contents. To avoid this set $empty to true - */ - public function deleteAll($directory, $empty = false) { - $directory = trim($directory, '/'); - if (!$this->is_dir($directory) || !$this->isReadable($directory)) { - return false; - } else { - $directoryHandle = $this->opendir($directory); - if (is_resource($directoryHandle)) { - while (($contents = readdir($directoryHandle)) !== false) { - if (!\OC\Files\Filesystem::isIgnoredDir($contents)) { - $path = $directory . '/' . $contents; - if ($this->is_dir($path)) { - $this->deleteAll($path); - } else { - $this->unlink($path); - } - } - } - } - if ($empty === false) { - if (!$this->rmdir($directory)) { - return false; - } - } - return true; - } - - } - public function getMimeType($path) { if ($this->is_dir($path)) { return 'httpd/unix-directory'; |