On Tue, 4 Jun 2002, Sang Park wrote:
> I'm trying to get the listing of sub-folders of a specific folder and am so
> far unable to do this with the LIST command.
Unfortunately, you've run up against a quality-of-implementation issue
with the Netscape 4.15 server. The server apparently ignores the
reference argument; it SHOULD NOT do that, but it is not forbidden from
doing so.
You're stuck with one of three unappealing choices:
(1) You can mash together the base directory and the desired wildcard
yourself:
a0 list "" inbox/*
The disadvantage of doing this is that you may not know at the client end
how the mashing is supposed to work. For example, if the user specifies
fred's files (assuming a UNIX type hierarchy), then
a0 list inbox/ ~fred/*
will do the right thing (resulting in "~fred/*"), whereas mashing it
yourself would result in:
a0 list "" inbox/~fred/*
since the client doesn't have a clue as to anything special about "~".
(2) You can continue to use the reference for the base directory, and try
to filter out names which do not start with either the supplied reference
string or the supplied base string. In other words, in the case of
a0 list inbox/ ~fred/*
you would filter out all names that do not start with either "inbox/" or
"~fred/".
This too has problems.
(3) you can continue to use the reference for the base directory, and just
live with the problem of inappropriate names. The idea here is that the
server has decided to ignore the base directory, and so the client should
accept the server's decision. Users will complain, but then you pass the
complaints on to the server vendor. Point the server vendor to RFC 2683,
section 3.4.9.
All of these options are unappealing. However, option (3) is the one that
offers the most hope in the long term, since servers which ignore the
reference HAVE been fixed and there is RFC 2683.
Of course, if you are *not* attempting to do any sort of "change
directory" in your client and can preclude any user-generated "breakouts"
from the hierarchy, then option (1) may work for you.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.