I need to determine the size of a very large character-encoded file. A read of the file takes a significant amount of time.
My understanding is that when a file is first created/modified the size is cached, so the OS can quickly retrieve the value when the size is requested, say, by a file manager. (eg. it seems quick when opening the properties dialog of a large file in win explorer)
Assuming the above is true, can this be retrieved in Java? I had thought that length() read the file to determine the size...or does it in fact get this cached size? Or does the creation of a File object do this read/retrieved the cached size?
My own research hasn't been able to answer these questions as yet.
I'd appreciate some help with my understanding
Thanks