6 * This is a helper class, that should aid in getting file classes setup.
7 * Most of its methods are implemented, and throw permission denied exceptions
11 * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
12 * @author Evert Pot (http://www.rooftopsolutions.nl/)
13 * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
15 abstract class Sabre_DAV_File extends Sabre_DAV_Node implements Sabre_DAV_IFile {
20 * data is a readable stream resource.
22 * @param resource $data
25 public function put($data) {
27 throw new Sabre_DAV_Exception_Forbidden('Permission denied to change data');
34 * This method may either return a string or a readable stream resource
38 public function get() {
40 throw new Sabre_DAV_Exception_Forbidden('Permission denied to read this file');
45 * Returns the size of the file, in bytes.
49 public function getSize() {
56 * Returns the ETag for a file
58 * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change.
59 * The ETag is an arbitrary string, but MUST be surrounded by double-quotes.
61 * Return null if the ETag can not effectively be determined
65 public function getETag() {
72 * Returns the mime-type for a file
74 * If null is returned, we'll assume application/octet-stream
78 public function getContentType() {