commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anton huber" <huber.an...@hotmail.com>
Subject Re: VFS Questions
Date Mon, 02 Jan 2006 21:59:44 GMT
Hi Mark!

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

   ad 4.: rename:
            long lastModTime = 
sourceFileObject.getContent().getLastModifiedTime();
            if (!sourceFileObject.canRenameTo(targetFileObject)){ // other 
device
                targetFileObject.copyFrom(sourceFileObject, 
Selectors.SELECT_SELF);
                sourceFileObject.delete(Selectors.SELECT_SELF);
             } else { // same device
                sourceFileObject.moveTo(targetFileObject);
            }
            targetFileObject.getContent().setLastModifiedTime(lastModTime);

   ad 5.: Is this realy a matter of VFS ?


Hope it helps.

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
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