getCanonicalPath()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

getCanonicalPath()

Julian Reschke
Hi,

I was just re-searching an old issue back from 2004, see
<http://lists.samba.org/archive/jcifs/2004-February/002945.html>:

> Julian Reschke said:
>> Note that for java.io.File, getCanonicalPath changes it's value
>> depending on whether a remote file with the same (or "similar") name
>> exists.
>
> Ok, now I understand. And I agree the behavor you describe would be
> better. But I believe it would require walking the path and resolving each
> component. I'll look into it but if canonicalization means N extra round
> trips to the server where N is the number of components in the path it may
> not be very practical. There might be a CIFS command to assist with this.
>
> ...
> Thanks,
> Mike

Does anybody remember whether there have been changes in the
getCanonicalPath() implementation since then?

Best regards, Julian

Reply | Threaded
Open this post in threaded view
|

Re: getCanonicalPath()

Michael B Allen-4
On Fri, 20 Jan 2006 16:35:00 +0100
Julian Reschke <[hidden email]> wrote:

> Hi,
>
> I was just re-searching an old issue back from 2004, see
> <http://lists.samba.org/archive/jcifs/2004-February/002945.html>:
>
> > Julian Reschke said:
> >> Note that for java.io.File, getCanonicalPath changes it's value
> >> depending on whether a remote file with the same (or "similar") name
> >> exists.
> >
> > Ok, now I understand. And I agree the behavor you describe would be
> > better. But I believe it would require walking the path and resolving each
> > component. I'll look into it but if canonicalization means N extra round
> > trips to the server where N is the number of components in the path it may
> > not be very practical. There might be a CIFS command to assist with this.
> >
> > ...
> > Thanks,
> > Mike
>
> Does anybody remember whether there have been changes in the
> getCanonicalPath() implementation since then?

No, getCanonicalPath() still only factors out '.' and '..'.

Mike