*/ public function listFiles(string $path): array; /** * chmod a file or directory. * * @param string $path * @param int $mode */ public function changePermissions(string $path, int $mode): void; /** * chown a file or directory. * * @param string $path * @param int|null $uid * @param int|null $gid */ 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 string $path * @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. */ 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 A promise resolving to a string upon successful resolution. */ 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. */ public function write(string $path, string $contents): void; }