[SAGA-RG] URLs and wildcards

Ceriel Jacobs ceriel at cs.vu.nl
Tue Dec 4 02:15:27 CST 2007


Andre Merzky wrote:
> Quoting [Ceriel Jacobs] (Dec 03 2007):
>>> B: why the limitation to relative path names?
>> Not really needed, indeed, but conceptually, wildcard expansion operates
>> on a directory, and we are talking about methods on directories here.
> 
> Sorry for being thick: yes, they operate on a directory, but
> how does that imply relative paths?  E.g., the following
> calls expand on the contents of a single directory, but
> would be impossible with relative paths:
> 
>   rm /tmp/*
>   cp /tmp/*/*.jpg /home/user/images/tmp/

Not impossible. In Java-speak:

	NSDirectory tmp = new NSDirectory(session, new URL("/tmp"), ...);
	tmp.remove("*");
	tmp.copy("*/*.jpg", new URL("/home/user/images/tmp/"), ...);

Cheers,		Ceriel


More information about the saga-rg mailing list