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)
 {
     $repo = $path->getRepository();
     $buffer = $repo->showFile($path->getLocalPath(), $path->getRef());
     $objectInfo = $repo->getObjectInfo($path->getLocalPath(), $path->getRef());
     return new StringBuffer($buffer, $objectInfo, 'r');
 }
Example #2
0
 /**
  * Returns true if this factory can handle the requested path
  *
  * @param   PathInformation     $path   The path information
  * @param   string              $mode   The mode used to open the file
  * @return  boolean                     True if this factory can handle the path
  */
 public function canHandle(PathInformation $path, $mode)
 {
     return $path->getRef() == 'HEAD' && !is_dir($path->getFullPath());
 }