commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Palmer <m...@anyware.co.uk>
Subject Re: VFS Questions
Date Mon, 02 Jan 2006 22:57:43 GMT

On 2 Jan 2006, at 21:59, anton huber wrote:

> Hi Mark!
>
>   ad 2.:
>      length() -> fileObject.getContent().getSize()
>      isFile() -> fileObject.getType()==FileType.FILE
>      isDirectory() -> fileObject.getType()==FileType.FOLDER
>      getLastModified() -> fileObject.getContent 
> ().getLastModifiedTime()
>

Note that the latter will not work if you get a URL from the  
fileObject and it is a local file system as in this example.

i.e.

URL u = fileObject.getUrl();
long lastmod = u.openConnection().getLastModified()

... lastmod is always zero. This has been raised as a bugzilla issue.

~ ~ ~
Marc Palmer (marc@anyware.co.uk)
Consultant/Analyst
AnyWare Ltd.
http://www.anyware.co.uk/


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


Mime
View raw message