in reply to Re: reading files and directories
in thread reading files and directories

I switched them around and the output didn't change. That's the part that seemed kinda weird to me. To my mind the output would have switched too.

Replies are listed 'Best First'.
Re: Re: Re: reading files and directories
by ysth (Canon) on Jan 07, 2004 at 19:29 UTC
    Switched what around? readdir will return the files in the actual order they are in the directory. AFAIK, most OS's don't give you any control over the actual order (though filesystems based on btrees (NTFS?) will have an automatic order.)
      I swapped the if -d and if -T statements, but either way the directories print out after the text files.