commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject RE: VFS LocalFile#getLocalFile() protected?
Date Fri, 15 May 2009 06:13:36 GMT
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:ryantxu@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-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org

org


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


Mime
View raw message