summaryrefslogtreecommitdiffstats
path: root/3rdparty/Sabre/DAV/Tree.php
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/Sabre/DAV/Tree.php')
-rwxr-xr-x[-rw-r--r--]3rdparty/Sabre/DAV/Tree.php77
1 files changed, 39 insertions, 38 deletions
diff --git a/3rdparty/Sabre/DAV/Tree.php b/3rdparty/Sabre/DAV/Tree.php
index 98e6f62c9e5..50216394155 100644..100755
--- a/3rdparty/Sabre/DAV/Tree.php
+++ b/3rdparty/Sabre/DAV/Tree.php
@@ -1,34 +1,34 @@
<?php
/**
- * Abstract tree object
- *
+ * Abstract tree object
+ *
* @package Sabre
* @subpackage DAV
- * @copyright Copyright (C) 2007-2011 Rooftop Solutions. All rights reserved.
- * @author Evert Pot (http://www.rooftopsolutions.nl/)
+ * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
+ * @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
abstract class Sabre_DAV_Tree {
-
+
/**
* This function must return an INode object for a path
- * If a Path doesn't exist, thrown an Exception_FileNotFound
- *
- * @param string $path
- * @throws Exception_FileNotFound
- * @return Sabre_DAV_INode
+ * If a Path doesn't exist, thrown a Exception_NotFound
+ *
+ * @param string $path
+ * @throws Sabre_DAV_Exception_NotFound
+ * @return Sabre_DAV_INode
*/
abstract function getNodeForPath($path);
/**
* This function allows you to check if a node exists.
*
- * Implementors of this class should override this method to make
+ * Implementors of this class should override this method to make
* it cheaper.
- *
- * @param string $path
- * @return bool
+ *
+ * @param string $path
+ * @return bool
*/
public function nodeExists($path) {
@@ -37,7 +37,7 @@ abstract class Sabre_DAV_Tree {
$this->getNodeForPath($path);
return true;
- } catch (Sabre_DAV_Exception_FileNotFound $e) {
+ } catch (Sabre_DAV_Exception_NotFound $e) {
return false;
@@ -50,12 +50,12 @@ abstract class Sabre_DAV_Tree {
*
* @param string $sourcePath The source location
* @param string $destinationPath The full destination path
- * @return void
+ * @return void
*/
public function copy($sourcePath, $destinationPath) {
$sourceNode = $this->getNodeForPath($sourcePath);
-
+
// grab the dirname and basename components
list($destinationDir, $destinationName) = Sabre_DAV_URLUtil::splitPath($destinationPath);
@@ -67,9 +67,9 @@ abstract class Sabre_DAV_Tree {
}
/**
- * Moves a file from one location to another
- *
- * @param string $sourcePath The path to the file which should be moved
+ * Moves a file from one location to another
+ *
+ * @param string $sourcePath The path to the file which should be moved
* @param string $destinationPath The full destination path, so not just the destination parent node
* @return int
*/
@@ -91,26 +91,26 @@ abstract class Sabre_DAV_Tree {
}
/**
- * Deletes a node from the tree
- *
- * @param string $path
+ * Deletes a node from the tree
+ *
+ * @param string $path
* @return void
*/
public function delete($path) {
$node = $this->getNodeForPath($path);
$node->delete();
-
+
list($parent) = Sabre_DAV_URLUtil::splitPath($path);
$this->markDirty($parent);
}
/**
- * Returns a list of childnodes for a given path.
- *
- * @param string $path
- * @return array
+ * Returns a list of childnodes for a given path.
+ *
+ * @param string $path
+ * @return array
*/
public function getChildren($path) {
@@ -127,14 +127,14 @@ abstract class Sabre_DAV_Tree {
* * node creations
* * copy
* * move
- * * renaming nodes
- *
+ * * renaming nodes
+ *
* If Tree classes implement a form of caching, this will allow
* them to make sure caches will be expired.
- *
+ *
* If a path is passed, it is assumed that the entire subtree is dirty
*
- * @param string $path
+ * @param string $path
* @return void
*/
public function markDirty($path) {
@@ -143,10 +143,11 @@ abstract class Sabre_DAV_Tree {
}
/**
- * copyNode
- *
- * @param Sabre_DAV_INode $source
- * @param Sabre_DAV_ICollection $destination
+ * copyNode
+ *
+ * @param Sabre_DAV_INode $source
+ * @param Sabre_DAV_ICollection $destinationParent
+ * @param string $destinationName
* @return void
*/
protected function copyNode(Sabre_DAV_INode $source,Sabre_DAV_ICollection $destinationParent,$destinationName = null) {
@@ -163,14 +164,14 @@ abstract class Sabre_DAV_Tree {
fwrite($stream,$data);
rewind($stream);
$data = $stream;
- }
+ }
$destinationParent->createFile($destinationName,$data);
$destination = $destinationParent->getChild($destinationName);
} elseif ($source instanceof Sabre_DAV_ICollection) {
$destinationParent->createDirectory($destinationName);
-
+
$destination = $destinationParent->getChild($destinationName);
foreach($source->getChildren() as $child) {