aboutsummaryrefslogtreecommitdiff
path: root/src/Phorkie/Repository.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Phorkie/Repository.php')
-rw-r--r--src/Phorkie/Repository.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Phorkie/Repository.php b/src/Phorkie/Repository.php
index 5273b60..d9fc234 100644
--- a/src/Phorkie/Repository.php
+++ b/src/Phorkie/Repository.php
@@ -76,7 +76,7 @@ class Repository
return $arFiles;
}
- public function getFileByName($name)
+ public function getFileByName($name, $bHasToExist = true)
{
$base = basename($name);
if ($base != $name) {
@@ -86,7 +86,7 @@ class Repository
throw new Exception_Input('Empty file name given');
}
$path = $this->repoDir . '/' . $base;
- if (!is_readable($path)) {
+ if ($bHasToExist && !is_readable($path)) {
throw new Exception_Input('File does not exist');
}
return new File($path, $this);