kotlin-stdlib / kotlin.io.path / java.nio.file.Path / fileSize fileSize JVM JRE7 1.4 @ExperimentalPathApi fun Path.fileSize(): Long Returns the size of a regular file as a Long value of bytes or throws an exception if the file doesn't exist. Exceptions IOException - if an I/O error occurred. See Also Files.size