in reply to How does Perl handle opendir/readdir/closedir internally?
If you look at the opendir(3) manpage, you will see that perl's opendir, readdir and closedir are handled directly by their C counterparts. The DIR * data type is defined I believe in dirent.h or in sys/types.h.
I believe implementing opendir, readdir and closedir are straightforward in XS given that this is their calling syntax:
DIR *opendir(const char *name); int closedir(DIR *dir); struct dirent *readdir(DIR *dir);
Did I answer the question?
Aziz,,,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How *do* they do that?
by gellyfish (Monsignor) on Aug 12, 2001 at 17:20 UTC |