Import

Kenneth Brody kenbrody at spamcop.net
Thu Aug 4 14:05:07 PDT 2011


On 8/4/2011 3:05 PM, Brian K. White wrote:
> On 8/4/2011 2:48 PM, Kenneth Brody wrote:
[...]
>> It's not the names of the files, it's the order of the files within the
>> directory. (And before you say "they're alphabetical", remember that the
>> "ls" command, as well as filePro, sorts the list.) The exact same set of
>> filenames might have different items missing if they came from a
>> different directory. (Or even if you deleted one of the files, and
>> created a new one with the same name.)
>
> You mean the order they appear in the filesystem directory entry?

Technically, it's the order that the readdir() system call returns the 
filenames.  However, I would expect that for most filesystems, they are one 
and the same.

> Would deleting, creating, and populating the directory, add-only, no
> moves or deletes, before opendir(), create consistent output from
> opendir() ?

If you could guarantee that you created the directory in such a way as to 
have the exact same names returned by readdir() in the exact same order.

> Not saying that's even something he could do in this case, maybe he
> could maybe he couldn't, just trying to establish, is it really random
> or is there really some way to influence or predict it, however theoretical.

It's not "random", because given the same directory, you will get the same 
list with the same missing items in the same place.  However, I'm not sure 
why you are trying to bother, when the bug has already been fixed.

-- 
Kenneth Brody


More information about the Filepro-list mailing list