[Jslib] Dir.readDir()

Greg Marine gregmarine at gmail.com
Sun Jan 14 11:14:47 PST 2007


Pete,

Thank you for your response. However, the issue I am having is in the sort
order of the files and directories on my Linux box. In Windows, the sort is
alphabetical. But in Linux, there doesn't appear to be any rhyme or reason
to the order in which the files and directories are returned by readDir(). I
want to have it sorted alphabetically.

Thanks,
Greg

On 1/14/07, Pete Collins <pete at mozdevgroup.com> wrote:
>
>
>
> Greg Marine wrote:
>
> > Hello,
> >
> > I'm having a sorting issue with the readDir() method of the Dir
> > module. On WinXP, the files/folders are in alphabetical order.
> > However, in Linux it won't sort alphabetically. I even attempted to
> > using the sort() method for JavaScript arrays and it still didn't sort
> > correctly. Is this a bug?
> >
> > I appreciate your help!
> >
>
> The platform shouldn't matter since readDir returns a js array of the
> entries ...
>
> The entries are js File objects.
>
> var e = d.readDir();
>
> jslibPrint(e[0].path);
>
>   /tmp/foo
>
> Hope this helps ...
>
> --pete
>
> --
> Pete Collins - Founder, Mozdev Group Inc.
> www.mozdevgroup.com
> Mozilla Software Development Solutions
> tel: 1-719-302-5811
> fax: 1-719-302-5813
>
> _______________________________________________
> Jslib mailing list
> Jslib at mozdev.org
> http://mozdev.org/mailman/listinfo/jslib
>



-- 
Internet Community Church Ministries
http://www.iccnet.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/jslib/attachments/20070114/cdcc7934/attachment.html 


More information about the Jslib mailing list