of

Creates FileSize representations for the given file.

Always returns a Bytes instance. For files ≤ 1 MiB, also returns a Lines instance. For files 1 MiB, only Bytes is returned to avoid loading large content.

Return

a list containing at least a Bytes instance and optionally a Lines instance

Parameters

Path

the filesystem path type

path

the file path to measure

fs

the filesystem provider used to access the file