[jcifs] Re: directory must end with '/'
Christopher R. Hertel
crh at ubiqx.mn.org
Fri Dec 10 19:02:42 GMT 2004
On Fri, Dec 10, 2004 at 03:20:33AM -0500, Michael B Allen wrote:
> On Thu, 9 Dec 2004 22:32:21 -0600
> "Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:
> > - The RFCs I've been reading keep talking in terms of the slashes
> > being "before" the path segments.
> RFC grammers are designed to be very precise about syntax. Our
> pseudo-grammer is not precise about syntax. It is designed to be a
> quick-guide to the user and as such I believe the pseudo-grammer should
> emphisize semantics rather than syntax.
I went ahead and changed it for the article, but applications (not
necessarily the underlying library) should handle semantic cleanup for the
user, when possible. Current applications that support other URI schemes
(such as web browsers supporting HTTP) already hide such details.
Internet culture is established, and I don't think that we can coax
end-users into changing either their perceptions or behavior.
> Because of pracitcal programming and
> useability reasons, Base URIs need a trailing slash. Therefore we should
> favor the pseudo-grammer form that includes trailing slashes after path
In the case of the SMB URI, it is possible to infer the semantics of the
object indicated by a URI based on the operation being performed. That's
what you've done with the .list() method. Higher-level software making
use of jCIFS will be able to catch the exception thrown here and make the
change for the user. This is analogous to the redirect that happens
behind the scenes in HTTP, except that no network traffic is required to
make it work. There are other situations in which a network query will
need to occur. The workgroup vs. fileserver situation is one such. I'm
interested in any others that can be identified.
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs