Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: typo and english cleanups

...

Every time you call a method on the resolve file object the data will be refreshed with the filesystem. This will give you the behaviour you might expect from a local file but also might be a hughe performance loss as it will greatly increase the network load.

You can also can archive achieve this cache strategy if you pack by wrapping the file object in an org.apache.commons.vfs.cache.OnCallRefreshFileObject

No Format
FileObject fo = VFS.getManager().resolveFile("....");
OnCallRefreshFileObject foc = new OnCallRefreshFileObject(fo);

the The difference to the above is, that in the first case you will always get the same file object instance and thus you can synchronize against on it.