From: Brent Callaghan (brent@jurassic)
Date: 03/16/97-10:47:56 PM Z
Date: Sun, 16 Mar 1997 20:47:56 -0800 (PST) From: Brent Callaghan <brent@jurassic> Subject: readdir wildcarding ? Message-ID: <Roam.1.1.858574076.18468.brent@jurassic> Filename wildcarding (globbing) is familiar to Unix users as a feature of the shell. It is not supported at all in the kernel and is unknown in Unix fileystems. The shell obtains the directory entries via readdir/getdents and does the pattern matching itself. DOS/Windows supports a similar feature, to the extent that "?" can be used to match any character and "*" any sequence of zero or more characters in the name. Since there is no "shell", the pattern matching is done in the OS. The SMB/CIFS protocol goes further in defining SEARCH wildcarding in the protocol so that the remote server does all the pattern matching. PC NFS implementations need to fetch the entire directory using NFS READDIR calls and have the client to the pattern match. Then if the client needs attribute information it must transmit LOOKUP calls for each match - if the attributes have not already been fetched via READDIRPLUS. PC users will argue that the SMB/CIFS approach is better because it requires less network traffic and fewer turnarounds - good attributes for an Internet protocol. I'm curious as to the opinions represented in this group regarding wildcard support in the protocol. Here are some options: 1. NFS v4 continues the NFS tradition and does not support wildcarding. Clients that need this functionality must fetch the entire directory and do the pattern match themselves. 2. NFS v4 support wildcarding with DOS-specific semantics, i.e. with 8.3 naming the filename and extension are matched separately and both "?" and "*" matches are supported. 3. NFS v4 support some "clean" subset of wildcarding, e.g. simple prefix or suffix match. 4. NFS v4 support wildcarding using a platform-independent pattern matching scheme that can express DOS wildcarding. IMO wildcarding belongs on the client as it is now with v2 and v3 so I favor the first option. Explicit support for DOS naming would get very messy in a Unicode environment and I'm not sure just how much it's used. Do DOS users really notice the lack of support for wildcarding in NFS ? If they really do, then would option 3. satisfy most of their needs ? It's certainly easier to implement than general wildcarding. If not, then option 4 looks better, but I doubt that it would benefit anyone but DOS users - so you may as well do 2. and be done with it. Opinions ? Brent
This archive was generated by hypermail 2.1.2 : 03/04/05-01:45:32 AM Z CST