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