commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <>
Subject RE: VFS LocalFile#getLocalFile() protected?
Date Fri, 15 May 2009 06:13:36 GMT

Not every FileObject can be represented as a local file, and thus getLocalFile ist protected.

What you can do is to replicate the file:

File file = fileObject.getFileSystem().replicateFile(fileObject, Selectors.SELECT_SELF);

For the local filesystem this simply exposes the local file object (no real replication takes
place). For any other file object, e.g. a reference to a file within a zip file real replication
takes place and the file will be copied to a temporary place.


-----Original Message-----
From: Ryan McKinley [] 
Sent: Friday, May 15, 2009 4:37 AM
Subject: VFS LocalFile#getLocalFile() protected?

Is there any reason LocalFile#getLocalFile() is protected rather then  

Since the process to reconstruct a File object is kinda clunky, it  
would be nice to just have access directly to the file object.


To unsubscribe, e-mail:
For additional commands, e-mail:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message