Hi!

I am back from vacation now, so lets start ...

  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);
Its sufficient to call moveTo in either case, moveTo will already handle the different filesystem case and get/set the lastModifiedTime if supported by the filesystem.

So:
sourceFileObject.moveTo(targetFileObject);

do the job.


Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to