@@ -127,7 +127,7 @@ private function getCalendarId($path) {
127127 }
128128
129129 /**
130- * Get all the meta data of a file or directory .
130+ * Get all the meta data of a file.
131131 *
132132 * @param string $path
133133 *
@@ -217,7 +217,7 @@ final public function fileExists(string $path): bool
217217
218218 $ calendarId = $ this ->getCalendarId ($ path );
219219 if ($ calendarId !== null ) {
220- return true ;
220+ return false ;
221221 } else {
222222 list ($ calendar , $ filename ) = $ this ->splitPath ($ path );
223223 $ calendarId = $ this ->getCalendarId ($ calendar );
@@ -229,7 +229,11 @@ final public function fileExists(string $path): bool
229229
230230 final public function directoryExists (string $ path ): bool
231231 {
232- return $ this ->fileExists ($ path );
232+ $ calendarId = $ this ->getCalendarId ($ path );
233+ if ($ calendarId !== null ) {
234+ return true ;
235+ }
236+ return false ;
233237 }
234238
235239 /**
@@ -337,7 +341,6 @@ final public function readStream(string $path): void
337341
338342 private function normalizeAcl ($ acl ) {
339343 return [
340- 'basename ' => '.acl ' ,
341344 'contents ' => $ acl ,
342345 'mimetype ' => 'text/turtle ' ,
343346 'path ' => '.acl ' ,
@@ -354,7 +357,6 @@ private function normalizeCalendarItem($calendarItem, $basePath) {
354357 }
355358
356359 return [
357- 'basename ' => $ calendarItem ['uri ' ],
358360 'contents ' => $ calendarItem ['calendardata ' ],
359361 'mimetype ' => 'text/calendar ' ,
360362 'path ' => $ basePath . '/ ' . $ calendarItem ['uri ' ],
@@ -368,8 +370,6 @@ private function normalizeCalendarItem($calendarItem, $basePath) {
368370 private function normalizeCalendar ($ calendar )
369371 {
370372 return [
371- 'basename ' => basename ($ calendar ['uri ' ]),
372- 'mimetype ' => 'directory ' ,
373373 'path ' => $ calendar ['uri ' ],
374374 'size ' => 0 ,
375375 'timestamp ' => 0 ,
0 commit comments