problems with File and caching

R

Roedy Green

I have discovered two rather unpleasant things about java.io.File.

If you do a file.getFileLength you get the OLD file length, not the
current length. I notice it in particular when I create a temp file,
delete the old file and rename the temp to the old name.

If you try to point two File objects at the same file, sometimes you
get an error.
 
R

Roedy Green

If you do a file.getFileLength you get the OLD file length, not the
current length. I notice it in particular when I create a temp file,
delete the old file and rename the temp to the old name.

Turns out this is not so. Sorry about that. It does not cache old
results.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top