size

abstract suspend fun size(path: Path): Long(source)

Gets the size of a file in bytes.

Return

The file size in bytes.

Parameters

path

The path to examine.

Throws

if the path doesn't exist or isn't a regular file.

IOException

if an I/O error occurs while determining the file size.