metadata

abstract suspend fun metadata(path: Path): FileMetadata?(source)

Retrieves metadata for a file or directory using a path.

Return

FileMetadata object or null if the path doesn't exist or isn't a regular file or directory.

Parameters

path

The path to examine.

Throws

IOException

if an I/O error occurs while retrieving metadata.