* * @throws FilesystemException If the operation fails. */ public function listFiles(string $path): array; /** * chmod a file or directory. * * @throws FilesystemException If the operation fails. */ public function changePermissions(string $path, int $mode): void; /** * chown a file or directory. * * @throws FilesystemException If the operation fails. */ public function changeOwner(string $path, ?int $uid, ?int $gid): void; /** * Update the access and modification time of the specified path. * * If the file does not exist it will be created automatically. * * @param int|null $modificationTime The touch time. If $time is not supplied, the current system time is used. * @param int|null $accessTime The access time. If $atime is not supplied, value passed to the $time parameter is * used. * * @throws FilesystemException If the operation fails. */ public function touch(string $path, ?int $modificationTime, ?int $accessTime): void; /** * Buffer the specified file's contents. * * @param string $path The file path from which to buffer contents. * * @return string The file contents. * * @throws FilesystemException If the operation fails. */ public function read(string $path): string; /** * Write the contents string to the specified path. * * @param string $path The file path to which to $contents should be written. * @param string $contents The data to write to the specified $path. * * @throws FilesystemException If the operation fails. */ public function write(string $path, string $contents): void; }