Beispiel #1
0
 public function getFilePath()
 {
     $fileName = $this->getFileName();
     $filePath = rtrim(\Config::$ARCHIVE_SOURCE_PATH, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . $this->getCustodianName() . DIRECTORY_SEPARATOR . $fileName;
     $this->filePathCollection[] = $filePath;
     if (File::exists($filePath)) {
         return $filePath;
     }
     return null;
 }
Beispiel #2
0
 /**
  * @param Archive $archive
  * @param $ext
  * @return string
  * @throws \Exception
  */
 protected function getDestinationFilePath(Archive $archive, $ext)
 {
     $path = strtr($this->getAbsoluteDestinationPath(), array('{PATH}' => $this->docMap[$ext], '{CODE}' => $archive->getAdvisorCode(), '{CUSTODIAN}' => $archive->getCustodian()));
     if (File::exists($path)) {
         return $path;
     }
     if (File::mkdir($path) == false) {
         throw new \Exception("Path [{$path}] has not been created.");
     }
     return $path;
 }