getFile() public method

$opts: 'branch' - (string)
public getFile ( $filename, $opts = [] )
示例#1
0
文件: Rcs.php 项目: jubinpatel/horde
 /**
  * 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);
 }
示例#2
0
文件: Cvs.php 项目: 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);
 }