8 * @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
9 * @author Evert Pot (http://www.rooftopsolutions.nl/)
10 * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
12 class Sabre_DAV_FS_File extends Sabre_DAV_FS_Node implements Sabre_DAV_IFile {
17 * @param resource $data
20 public function put($data) {
22 file_put_contents($this->path,$data);
31 public function get() {
33 return fopen($this->path,'r');
38 * Delete the current file
42 public function delete() {
49 * Returns the size of the node, in bytes
53 public function getSize() {
55 return filesize($this->path);
60 * Returns the ETag for a file
62 * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change.
63 * The ETag is an arbitrary string, but MUST be surrounded by double-quotes.
65 * Return null if the ETag can not effectively be determined
69 public function getETag() {
76 * Returns the mime-type for a file
78 * If null is returned, we'll assume application/octet-stream
82 public function getContentType() {