buildFileSize
suspend fun <Path> buildFileSize(fs: FileSystemProvider.ReadOnly<Path>, path: Path, contentType: FileMetadata.FileContentType? = null): List<FileSize>(source)
Creates FileSize representations for the given file.
Always returns a FileSize.Bytes instance. For text files ≤ 1 MiB, also returns a FileSize.Lines instance. For files 1 MiB or non-text files, only FileSize.Bytes is returned to avoid loading large or unsupported content.
Return
a list containing FileSize.Bytes and, for small text files, FileSize.Lines
Parameters
Path
the filesystem path type
fs
the filesystem provider used to access the file
path
the file path to measure
contentType
optional file content type