diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-27 16:33:10 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-27 16:33:10 +0200 |
commit | 894d44e796bf99882383fcee42f754c5d9d6828b (patch) | |
tree | 848094d3e67f86a337b9be332108fe571334303c /3rdparty/Sabre/DAV/FSExt | |
parent | c1c76539cc2878c058de15892dd05d6dd8b4b9a5 (diff) | |
parent | b2b84f3a6f3c98005f80c6c7c558a33b4ea36193 (diff) | |
download | nextcloud-server-894d44e796bf99882383fcee42f754c5d9d6828b.tar.gz nextcloud-server-894d44e796bf99882383fcee42f754c5d9d6828b.zip |
Merge remote-tracking branch 'git://github.com/susinths/SabreDAV_1.7.1.git'
Conflicts:
lib/base.php
Diffstat (limited to '3rdparty/Sabre/DAV/FSExt')
-rw-r--r--[-rwxr-xr-x] | 3rdparty/Sabre/DAV/FSExt/Directory.php | 5 | ||||
-rw-r--r--[-rwxr-xr-x] | 3rdparty/Sabre/DAV/FSExt/File.php | 32 | ||||
-rw-r--r--[-rwxr-xr-x] | 3rdparty/Sabre/DAV/FSExt/Node.php | 0 |
3 files changed, 32 insertions, 5 deletions
diff --git a/3rdparty/Sabre/DAV/FSExt/Directory.php b/3rdparty/Sabre/DAV/FSExt/Directory.php index 540057183b3..70dfdc2c3b5 100755..100644 --- a/3rdparty/Sabre/DAV/FSExt/Directory.php +++ b/3rdparty/Sabre/DAV/FSExt/Directory.php @@ -17,7 +17,7 @@ class Sabre_DAV_FSExt_Directory extends Sabre_DAV_FSExt_Node implements Sabre_DA * Data will either be supplied as a stream resource, or in certain cases * as a string. Keep in mind that you may have to support either. * - * After succesful creation of the file, you may choose to return the ETag + * After successful creation of the file, you may choose to return the ETag * of the new file here. * * The returned ETag must be surrounded by double-quotes (The quotes should @@ -64,6 +64,9 @@ class Sabre_DAV_FSExt_Directory extends Sabre_DAV_FSExt_Node implements Sabre_DA /** * Returns a specific child node, referenced by its name * + * This method must throw Sabre_DAV_Exception_NotFound if the node does not + * exist. + * * @param string $name * @throws Sabre_DAV_Exception_NotFound * @return Sabre_DAV_INode diff --git a/3rdparty/Sabre/DAV/FSExt/File.php b/3rdparty/Sabre/DAV/FSExt/File.php index b93ce5aee21..590fb808e61 100755..100644 --- a/3rdparty/Sabre/DAV/FSExt/File.php +++ b/3rdparty/Sabre/DAV/FSExt/File.php @@ -9,15 +9,15 @@ * @author Evert Pot (http://www.rooftopsolutions.nl/) * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License */ -class Sabre_DAV_FSExt_File extends Sabre_DAV_FSExt_Node implements Sabre_DAV_IFile { +class Sabre_DAV_FSExt_File extends Sabre_DAV_FSExt_Node implements Sabre_DAV_PartialUpdate_IFile { /** * Updates the data * * data is a readable stream resource. * - * @param resource $data - * @return void + * @param resource|string $data + * @return string */ public function put($data) { @@ -27,9 +27,33 @@ class Sabre_DAV_FSExt_File extends Sabre_DAV_FSExt_Node implements Sabre_DAV_IFi } /** + * Updates the data at a given offset + * + * The data argument is a readable stream resource. + * The offset argument is a 0-based offset where the data should be + * written. + * + * param resource|string $data + * @return void + */ + public function putRange($data, $offset) { + + $f = fopen($this->path, 'c'); + fseek($f,$offset-1); + if (is_string($data)) { + fwrite($f, $data); + } else { + stream_copy_to_stream($data,$f); + } + fclose($f); + return '"' . md5_file($this->path) . '"'; + + } + + /** * Returns the data * - * @return string + * @return resource */ public function get() { diff --git a/3rdparty/Sabre/DAV/FSExt/Node.php b/3rdparty/Sabre/DAV/FSExt/Node.php index 68ca06beb7e..68ca06beb7e 100755..100644 --- a/3rdparty/Sabre/DAV/FSExt/Node.php +++ b/3rdparty/Sabre/DAV/FSExt/Node.php |