Agreed. As noted, I had been using fileio's popen() to run a shell command
for ls. It's a bit more work, but it's portable. The main difficulty of
popen is that it requires a bit of effort to detect failure of the shell
command, given that there's only one stream and no exit status.

It is nice (not to mention very useful) to have a reasonably complete set
of basic file operations. Thanks for that!


On Tue, Jul 8, 2014 at 5:08 AM, Juergen Sauermann <
[email protected]> wrote:

> Hi,
>
> I think we have to draw the border between FILE_IO and convenience
> functions somewhere.
> Otherwise we would end up with the entire libc accessible via FILE_IO.
>
> And, remember, we have this nice language called APL to do such things.
>
> /// Jürgen
>
>
>
> On 07/08/2014 05:56 AM, David B. Lamkins wrote:
>
>> It looks like glob() subsumes the function of readdir(). There are some
>> nasty details with allocated results, too...
>>
>> You could, however, combine fnmatch() with readdir().
>>
>> http://linux.die.net/man/3/fnmatch
>>
>> On Tue, 2014-07-08 at 11:44 +0800, Elias Mårtenson wrote:
>>
>>> How about adding support for a dyadic form where the left-side
>>> argument is a glob pattern to be used when matching the file names?
>>>
>>>
>>> http://linux.die.net/man/3/glob
>>>
>>>
>>>
>>> Regards,
>>> Elias
>>>
>>>
>>>
>


-- 
"The secret to creativity is knowing how to hide your sources."
   Albert Einstein


http://soundcloud.com/davidlamkins
http://reverbnation.com/lamkins
http://reverbnation.com/lcw
http://lamkins-guitar.com/
http://lamkins.net/
http://successful-lisp.com/

Reply via email to