Hi!

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.

Ciao,
Mario

-----Original Message-----
From: Ryan McKinley [mailto:ryan...@gmail.com] 
Sent: Friday, May 15, 2009 4:37 AM
To: user@commons.apache.org
Subject: VFS LocalFile#getLocalFile() protected?

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

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

ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org

Reply via email to