From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <43332BD2.2040007@lanl.gov> Date: Thu, 22 Sep 2005 16:10:26 -0600 From: Ronald G Minnich User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) MIME-Version: 1.0 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [9fans] dirread() and dirreadall() Topicbox-Message-UUID: 8f47cf80-ead0-11e9-9d60-3106f5b1d025 As I read the man page for dirread(), it kind of implies that it returns an array of entries, and also implies that it returns one dir entry at a time. "It [dirread] reads from fd and unpacks the data into an array of Dir structures whose address is returned in *buf (see stat(3) for the layout of a Dir)." but " by contrast, dirread steps through a directory one read(3) at a time." Anyways, FWIW, dirread reads in as much as it can, up to a limit of DIRMAX bytes, and fails if it can not allocate that much; and dirreadall reads in as much as it can, up to a limit of allocatable memory, and fails if it can not allocate that much. For dirreadone(), I think, ya rolls yer own. apologies if the error here is my inability to parse english. ron