size

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

Retrieves the size of the file or directory at the specified path.

Return

The size of the file or directory in bytes. For directories, this may represent the cumulative size of its contents, depending on the implementation.

Parameters

path

The path of the file or directory whose size is to be determined.