From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3DBFBD41.3040400@strakt.com> From: Boyd Roberts User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1 MIME-Version: 1.0 To: 9fans@cse.psu.edu Subject: Re: [9fans] WebDAV file system References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 30 Oct 2002 12:06:41 +0100 Topicbox-Message-UUID: 11e6a50c-eacb-11e9-9e20-41e7f4b1d025 Russ Cox wrote: >The hard part about ftpfs is parsing the directory listings >and caching the results so that things like ls work reasonably. > Well, yes and no. The RFC says you should not* parse the machine dependent [LIST] output and you should use the results of NLST. The trouble is that the latter doesn't actually tell you very much. Anyway a lot of the detail is useless, but knowing the size is useful. When I did ftpfs with NFS I decided to use NLST, forge the link count [who cares?], cd into everything (giving file/directory info), forge the mode and set the size to 0. As stuff got read/written, sizes were 'learnt'. Modes were learnt too as a result of getting read/write permission errors. If was a fools errand anyway, but it did demonstrate [again] that NFS was a lousy protocol. * It actually says '... may be hard to use automatically in a program'. I guess I read that as 'I'll be buggered if I'll code up any more system dependent string smashing in C -- dealing with NFS and XDR has been bad enough'.