read

abstract suspend fun read(path: Path): String?(source)

Retrieves the content of a file as a string. This operation is atomic and handles missing files gracefully.

Return

File content as string, or null if: - File doesn't exist - Path is a directory - File is not readable

Parameters

path

Path to the file to read