I'm writing a scala script, that need to know a size of a file. How do I do this correctly? In Python I would do
os.stat('somefile.txt').st_size
and in Scala?
I'm writing a scala script, that need to know a size of a file. How do I do this correctly? In Python I would do
os.stat('somefile.txt').st_size
and in Scala?
java.nio.file.Files.size
from api:
public static long size(Path path) throws IOException
Returns the size of a file (in bytes)