Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Is readdir ever deterministic?

by ncw (Friar)
on Sep 17, 2001 at 23:22 UTC ( #112934=note: print w/ replies, xml ) Need Help??


in reply to Is readdir ever deterministic?

Does there exist a platform where readdir returns . and .. in other than the first two return values?

Hmm, good question! If any filing system would do this it would be reiserfs under linux. Reiserfs uses a hashed directory structure rather than the linear directory structure as used by most other fs. Reiser returns directory entries in hash order (a familiar concept to perl programmers!).

I just tried it and the answer is reiserfs always puts "." and ".." first! The hash order isn't as random as a perl hash either which is interesting too.


Comment on Re: Is readdir ever deterministic?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://112934]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (12)
As of 2015-07-07 15:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (91 votes), past polls