Re: "." and ".." returned by dir()

new topic     » goto parent     » topic index » view thread      » older message » newer message

Juergen Luethje wrote:
> 
> Hello Rob and all,
> 
> in the documentation of dir() it reads:
> <quote>
> If st names a *directory* you may have entries for "." and ".."
> </quote>
> 
> After my experience, those entries are normally at the _beginning_
> of the list which is returned by dir(). Can I rely on the assumption
> that this is _always_ the case?
> 
> Regards,
>    Juergen

Hi Juergen.
I don't know for shure, but methinks that DOS returns the files and the
directories ordered by date.
If this is always true, it might be that you have some files dated earlier
than the directories where they reside, so this may not be always true.
This can happen if you create a directory and then you move some files to it.
Regards.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu