Example #1
0
 private function _checkFile1(PhingFile $file)
 {
     // Resolve symbolic links
     if ($this->followSymlinks && $file->isLink()) {
         $file = new PhingFile($file->getLinkTarget());
     }
     if ($this->type !== null) {
         if ($this->type === "dir") {
             return $file->isDirectory();
         } else {
             if ($this->type === "file") {
                 return $file->isFile();
             }
         }
     }
     return $file->exists();
 }
Example #2
0
 /**
  * @param PhingFile $file
  * @return bool
  * @throws IOException
  */
 private function _checkFile1(PhingFile $file)
 {
     // Resolve symbolic links
     if ($this->followSymlinks && $file->isLink()) {
         $linkTarget = new PhingFile($file->getLinkTarget());
         if ($linkTarget->isAbsolute()) {
             $file = $linkTarget;
         } else {
             $fs = FileSystem::getFileSystem();
             $file = new PhingFile($fs->resolve($fs->normalize($file->getParent()), $fs->normalize($file->getLinkTarget())));
         }
     }
     if ($this->type !== null) {
         if ($this->type === "dir") {
             return $file->isDirectory();
         } else {
             if ($this->type === "file") {
                 return $file->isFile();
             }
         }
     }
     return $file->exists();
 }