How do I get the file size on disk?
As I know, File.length() can be used to get the file size.
But I would like to know how to get the actual file size on disk?
As I know, File.length() can be used to get the file size.
But I would like to know how to get the actual file size on disk?
If you mean the file size rounded up to the next block boundary, you can do it yourself if you know the block size. If you don't mean that I don't know what you mean.
Actually, I really don't know what you say.
But when you see the properties of a file in Windows, you can see there are two file size. One is called "SIze" and the other one is called "Size on disk".
Therefore, I would like to know the size on disk but not just the size.