[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [geclipse-dev] File Transfer
|
POD69@xxxxxxx pisze:
Hi Mathias
This EFS is new and seems interesting. Actually I use this piece of code
URI uri = new URI("gsiftp://aliserv6.ct.infn.it:2811/dpm/ct.infn.it/home/geclipsetutor/foofoo/");
IFileStore fs = EFS.getStore( uri );
System.out.println(fs.getFileSystem().canWrite());
IFileSystem fileSystem = EFS.getLocalFileSystem();
IFileStore homeDir = fileSystem.getStore(URI.create("/home/pod/files"));
homeDir.copy(fs, EFS.SHALLOW | EFS.OVERWRITE, null);
IFileInfo info = fs.fetchInfo();
System.out.println( info.exists()+
info.getName()+
info.getLength()+
info.getLastModified()+
info.isDirectory()
);
System.out.println("end");
With that code I should fetch all files in foofoo to my local dir? This System.out.println(fs.getFileSystem().canWrite()); is true so I gues I have a connection.But nothing happens?
As Mathias and Ariel said, it's not going to work. But here are my cents:
canWrite(), canDelete and isCaseSensitive() methods are indicators only.
canWrite() is alwas true, even if you don't have write access, this only
indicates that this filesystem is able to perform writes, doesn't mean
you are already connected.
Moreover, method fetchInfo, for the store you have created, returns just
an empty FileInfo (with the name only probably). The fetchInfo does not
connect to the server (in our implementation), it just return cached
FileInfo.
This is due to avoid asking for token once the connection is defined but
yet not opened (this would be very annoying during gEclipse start). Once
you list this directory, all entries inside will be fully represented.
--
Best regards
Mateusz Pabis