From 4f6a65c5c313ca5f9b4ca12846c09bd4222fdde5 Mon Sep 17 00:00:00 2001 From: Doug Wilbourne Date: Tue, 10 Sep 2024 14:15:25 -0400 Subject: [PATCH] changed the return type of FileAccess::getDirectoryContents to array|false --- src/storage/filesys/FileAccessInterface.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/storage/filesys/FileAccessInterface.php b/src/storage/filesys/FileAccessInterface.php index 46eb340..7be0f4f 100644 --- a/src/storage/filesys/FileAccessInterface.php +++ b/src/storage/filesys/FileAccessInterface.php @@ -12,19 +12,24 @@ */ interface FileAccessInterface { + public function fileEntryExists(string $fileEntryName): bool; public function fileExists(string $fileName): bool; public function fileIsReadable(string $fileName): bool; public function fileIsWriteable(string $fileName): bool; - public function fileGetContents(string $fileName): string|false; + public function directoryExists(string $dirName): bool; - public function filePutContents(string $fileName, string $data): bool; + public function directoryIsReadable(string $dirName): bool; - public function fileGetLine(): string|false; + public function directoryIsWriteable(string $dirName): bool; - public function filePutLine(string $data): bool; + public function getDirectoryContents(string $dirName, bool $withDots = false, int $sortOrder = SCANDIR_SORT_ASCENDING): array|false; + + public function fileGetContents(string $fileName): string|false; + + public function filePutContents(string $fileName, string $data): bool; public function openFile(string $fileName, string $mode): bool; @@ -36,11 +41,10 @@ public function closeFile(): bool; public function eof(): bool; - public function directoryExists(string $dirName): bool; + public function fileGetLine(): string|false; + + public function filePutLine(string $data): bool; - public function directoryIsWriteable(string $dirName): bool; - public function directoryIsReadable(string $dirName): bool; - public function getDirectoryContents(string $dirName, bool $withDots = false): ?array; }