Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: AW: AW: AW: [geclipse-dev] File Transfer

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?

Also  System.out.println( info.exists()+
	         info.getName()+
	        info.getLength()+
	         info.getLastModified()+
	         info.isDirectory()
	         ); 
and   System.out.println("end"); is not printed out.


To get a auth token I use the code of romain so there should be a valid token in the project.
Any hints what could be wrong?

thx pod








Stuempert, Mathias IWR schrieb:
> Hi Pod,
>
>> I just just want to access a remote location via gsiftp so I can fetch
> the > joboutput files to my computer. And I am also interested in some
> file
>> operations eg create del dirs/files.
>
> Ok, makes things much easier. In that case you may directly use the
> gsiftp implementation instead of dealing with our model or the wrapper
> implementation. So in fact let's assume you have your gsiftp-URL. Then
> just get a corresponding file store with:
>
> URI uri = new URI("gsiftp://egee016.cnaf.infn.it:2811/";);
> IFileStore fs = EFS.getStore( uri );
>
> At least if the eu.geclipse.efs.gridftp plug-in is installed correctly
> this should give you an IFileStore object pointing to the root directory
> of your gsiftp server (Check your access rights there, not everybody has
> access to the root dir ;-) If you would like to directly access a
> directory or a file on that server you should just specify the
> corresponding path as part of your URI, i.e.
> URI("gsiftp://egee016.cnaf.infn.it:2811/home/johndoe/mydata.xml";).
>
> So now you're totally free to use the methods defined in IFileStore
> (http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.do
> c.isv/reference/api/org/eclipse/core/filesystem/IFileStore.html) to list
> children (childNames(...), childStores(...)) or to open input and output
> streams if the underlying file store is not a directory
> (openInputStream(...), openOutputStream(...)). It should be just as
> simple as that.
>
> Note that there is still the need to authenticate yourself against the
> gsiftp server. A GlobusProxy should be enough. If you have problems with
> programmatically creating such a proxy you should have a look at this
> posting http://dev.eclipse.org/mhonarc/lists/geclipse-dev/msg01050.html
> and its follow-ups (or just ask again ;-)
>
> Sorry for bugging you with the other stuff about the connections. This
> gets very important if you are using EFS within the Eclipse resource
> trees or if you are intending to use the g-Eclipse model in larger
> parts. For your case the pure EFS should be sufficient. Sometimes I'm a
> bit too deep in our architecture ;-)
>
> Hope that helps,
>
> Mathias
> _______________________________________________
> geclipse-dev mailing list
> geclipse-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/geclipse-dev
>

-- 
GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx


Back to the top