[saga-rg] NSDir - and working directory

Tom Goodale goodale at cct.lsu.edu
Fri Aug 26 07:18:37 CDT 2005



On Fri, 26 Aug 2005, Andre Merzky wrote:

> Hmm, maybe I misunderstood the question.  Opening (or
> constructing) a dir should have a uri as parameter, which is
> the initial pwd.  (BTW: adding the constructors is on my
> TODO list I think - thanks for the remonder ;-)
>
> But what is about this case:
>
>  dir d ("http://www.host.net/home/andre");
>
>  d.copy ("http://www.host.net/home/andre/test.dat", "./test.dat");
>
> What is the target of the copy call relative to?
> As terry said, even more difficult for the relative remote
> case.

It should be relative to the pwd of d, in the same way as when I do

cd /home/andre

cp /home/andre/test.dat ./test.dat

(which would of course give an error as they are the same file);  target 
is relative to the current working directory.

Tom

>
> Cheers, Andre.
>
>
> Quoting [Tom Goodale] (Aug 26 2005):
>>
>> On Fri, 26 Aug 2005, Andre Merzky wrote:
>>
>>>> 6. In the very first call to a SAGA API, if the source or target is
>>>> relative to a current working directory then where is the source or
>>>> target current working directory set ? Particularly if the source is
>>>> non-local.
>>>
>>> Short answer: *shrug* ;-)
>>>
>>> Long answer: it depends...
>>
>> I was assuming the current working directory for an NSDir (well, a
>> physical directory or a logical directory) would be set in its
>> constructor, although looking at the spec I see that this is missing.  Let
>> me make it a proposal then 8-)
>>
>> Tom
>
>
>
>





More information about the saga-rg mailing list