| @@ 54-62 (lines=9) @@ | ||
| 51 | /** |
|
| 52 | * Get the full absolute location of the document on the filesystem. |
|
| 53 | */ |
|
| 54 | public function getDocumentPath(Path $p) |
|
| 55 | { |
|
| 56 | $documentPath = $this->baseDir.$p->getPath(); |
|
| 57 | if (!is_readable($documentPath)) { |
|
| 58 | throw new DocumentStorageException('unable to read document'); |
|
| 59 | } |
|
| 60 | ||
| 61 | return $documentPath; |
|
| 62 | } |
|
| 63 | ||
| 64 | public function getDocument(Path $p) |
|
| 65 | { |
|
| @@ 203-209 (lines=7) @@ | ||
| 200 | return 0 === count($entries); |
|
| 201 | } |
|
| 202 | ||
| 203 | private function deleteFolder(Path $p) |
|
| 204 | { |
|
| 205 | $folderPath = $this->baseDir.$p->getPath(); |
|
| 206 | if (false === @rmdir($folderPath)) { |
|
| 207 | throw new DocumentStorageException('unable to delete folder'); |
|
| 208 | } |
|
| 209 | } |
|
| 210 | } |
|
| 211 | ||