[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add "scandir" procedure
From: |
Nala Ginrut |
Subject: |
Re: [PATCH] Add "scandir" procedure |
Date: |
Tue, 20 Dec 2011 03:20:59 +0800 |
hi Ludo, nice job!And I tested it, it works.
But I did find some problems. Now there're three:
1. I think file-system-fold based scandir tried to traverse the whole directories include sub-directories. It's rather slow for a deep one if I just
want a files list under 0 level directory tree;
2. New scandir will crash while encounters a Chinese file name. This will be eliminated by using (setlocale LC_ALL "zh_CN.UTF-8").
I think it's the same problem we faced in another thread. There's something locale problem in Guile. Of course, we have a temporary solution in recent commit;
3. It returns weird result. E.g (scandir "mmr")
==> ("." "." "." ".." ".." ".." "aa.c" "exclude" "ml" "myecl")
There're two sub-directories, so two more dot & dot-dot added.
Anyway, I think new scandir's cool. Though it's little slow than my C wrap version, it's more hackable.
Maybe I'll keep C wrap scandir in my project for a time. But it's reasonable to change it to the new one in the future but depends on it's efficiency.