/** * streamWrapper::stream_close — Close an resource */ public function stream_close() { $this->fileBuffer->close(); $this->fileBuffer = null; $repo = $this->path->getRepository(); if ($repo->isDirty()) { $repo->add(array($this->path->getFullPath())); $commitMsg = $this->getContextOption('commitMsg', null); $author = $this->getContextOption('author', null); $repo->commit($commitMsg, array($this->path->getFullPath()), $author); } $this->path = null; }
/** * Returns the file stream to handle the requested path * * @param PathInformationInterface $path The path information * @param string $mode The mode used to open the path * @return FileBufferInterface The file buffer to handle the path */ public function createFileBuffer(PathInformationInterface $path, $mode) { return new StreamBuffer($path->getFullPath(), $mode); }