From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 From: Venkatesh Srinivas Date: Mon, 7 Mar 2011 20:09:33 -0500 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=20cf3054a0db0fd76d049dee4522 Subject: [9fans] Listing a directory Topicbox-Message-UUID: b882c85e-ead6-11e9-9d60-3106f5b1d025 --20cf3054a0db0fd76d049dee4522 Content-Type: text/plain; charset=UTF-8 Hi, In 9P, if I wish to list a directory, I need to TWalk to the directory, TOpen the directory fid from the walk, and then TRead till I have all of the contents of the directory. If the directory's contents do not fit in a single read, I imagine I need to loop around TOpen / Tread / .... / Tread / TOpen, till I get the whole contents and see the same QIDs in each open, to get a coherent listing. (is this accurate?) Unfortunately, a TOpened FID to a directory cannot be used for walking it (why?); so the only use of a TOpened fid to a directory is to list it or to get a QID. Would it be reasonable for a TOpened fid to a directory to create a copy of the directory listing at the time of the RPC? -- vs --20cf3054a0db0fd76d049dee4522 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,

In 9P, if I wish to list a directory, I need to TWalk to the dir= ectory, TOpen the directory fid from the walk, and then TRead till I have a= ll of the contents of the directory.
If the directory's contents do = not fit in a single read, I imagine I need to loop around TOpen / Tread / .= ... / Tread / TOpen, till I get the whole contents and see the same QIDs in= each open, to get a coherent listing. (is this accurate?)

Unfortunately, a TOpened FID to a directory cannot be used for walking = it (why?); so the only use of a TOpened fid to a directory is to list it or= to get a QID. Would it be reasonable for a TOpened fid to a directory to c= reate a copy of the directory listing at the time of the RPC?

-- vs
--20cf3054a0db0fd76d049dee4522--