Re: [9fans] Listing a directory

2011-03-09 Thread Latchesar Ionkov
I don't think there is a way for you to get a coherent listing no matter what you do. Files may be created and removed all the time, so coherent listing doesn't have much sense. In some cases it may be reasonable to atomically create a copy of the directory listings (some of my file servers do), b

Re: [9fans] Listing a directory

2011-03-07 Thread Eric Van Hensbergen
On Mon, Mar 7, 2011 at 7:09 PM, Venkatesh Srinivas wrote: > > 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 rea

[9fans] Listing a directory

2011-03-07 Thread Venkatesh Srinivas
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