getFile() public method

$opts: 'branch' - (string)
public getFile ( $filename, $opts = [] )
Exemplo n.º 1
0
 /**
  * TODO
  */
 public function getFile($filename, $opts = array())
 {
     $filename = ltrim($filename, '/');
     $fname = $filename . ',v';
     if (!@is_file($this->sourceroot . '/' . $fname)) {
         throw new Horde_Vcs_Exception(sprintf('File "%s" not found', $filename));
     }
     return parent::getFile($fname, $opts);
 }
Exemplo n.º 2
0
Arquivo: Cvs.php Projeto: horde/horde
 /**
  * TODO
  */
 public function getFile($filename, $opts = array())
 {
     $filename = ltrim($filename, '/');
     $fname = $filename . ',v';
     /* Assume file is in the Attic if it doesn't exist. */
     if (!@is_file($this->sourceroot . '/' . $fname)) {
         $fname = dirname($filename) . '/Attic/' . basename($filename) . ',v';
     }
     if (!@is_file($this->sourceroot . '/' . $fname)) {
         throw new Horde_Vcs_Exception(sprintf('File "%s" not found', $filename));
     }
     return Horde_Vcs_Base::getFile($fname, $opts);
 }