芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/www/cloud.pulsehost.co.uk/vendor/afterlogic/dav/lib/DAV/FS/Shared/File.php
name = $name; $this->node = $node; } /** * Returns the last modification time, as a unix timestamp * * @return int */ public function getLastModified() { if ($this->node) { return $this->node->getLastModified(); } return 0; } /** * Returns the last modification time, as a unix timestamp * * @return int */ public function getSize() { if ($this->node) { return $this->node->getSize(); } return 0; } public function get($bRedirectToUrl = true) { if ($this->node) { return $this->node->get($bRedirectToUrl); } return ''; } public function put($data) { $aExtendedProps = $this->node->getProperty('ExtendedProps'); if ($this->node && !(is_array($aExtendedProps) && isset($aExtendedProps['InitializationVector']))) { return $this->node->put($data); } else { return false; } } public function getHistoryDirectory() { $oNode = null; if ($this->node) { list(, $owner) = \Sabre\Uri\split($this->getOwner()); try { $oNode = Server::getNodeForPath('files/'. $this->node->getStorage() . $this->node->getRelativePath() . '/' . $this->node->getName() . '.hist', $owner); } catch (\Exception $oEx) { } } return $oNode; } public function patch($data, $rangeType, $offset = null) { $aExtendedProps = $this->node->getProperty('ExtendedProps'); if ($this->node && !(is_array($aExtendedProps) && isset($aExtendedProps['InitializationVector']))) { return $this->node->patch($data, $rangeType, $offset); } else { return false; } } /** * Returns the ETag for a file. * * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. * The ETag is an arbitrary string, but MUST be surrounded by double-quotes. * * Return null if the ETag can not effectively be determined * * @return string|null */ public function getETag() { $result = null; if ($this->node) { $result = $this->node->getETag(); } return $result; } }