[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Portably iterate over a directory
- From: Rob Kendrick <lua-l@...>
- Date: Mon, 30 Nov 2009 23:07:15 +0000
On Mon, 30 Nov 2009 23:54:48 +0300
Alexander Gladysh <agladysh@gmail.com> wrote:
> > This won't work reliably due to charset issues, I fear. You really
> > have to use proper operating system APIs for this job.
>
> Even if I don't need absolute paths and all files and sub-directories
> that I traverse are guaranteed to be contain [a-zA-Z_-.] only?
There are too many issues to count. Like, "What if the user has
aliased {dir,ls} to something else unexpected?"
This is very common in the UNIX world.
B.