4 Interface for perl directory functions
10 PerlXXX_YYY explained - DickH and DougL @ ActiveState.com
12 XXX := functional group
13 YYY := stdlib/OS function name
15 Continuing with the theme of PerlIO, all OS functionality was
16 encapsulated into one of several interfaces.
19 PerlLIO - low level I/O
20 PerlMem - malloc, realloc, free
21 PerlDir - directory related
22 PerlEnv - process environment handling
23 PerlProc - process control
24 PerlSock - socket functions
27 The features of this are:
28 1. All OS dependant code is in the Perl Host and not the Perl Core.
29 (At least this is the holy grail goal of this work)
30 2. The Perl Host (see perl.h for description) can provide a new and
31 improved interface to OS functionality if required.
32 3. Developers can easily hook into the OS calls for instrumentation
33 or diagnostic purposes.
35 What was changed to do this:
36 1. All calls to OS functions were replaced with PerlXXX_YYY
42 #ifndef __Inc__IPerlDir___
43 #define __Inc__IPerlDir___
48 virtual int Makedir(const char *dirname, int mode, int &err) = 0;
49 virtual int Chdir(const char *dirname, int &err) = 0;
50 virtual int Rmdir(const char *dirname, int &err) = 0;
51 virtual int Close(DIR *dirp, int &err) = 0;
52 virtual DIR *Open(char *filename, int &err) = 0;
53 virtual struct direct *Read(DIR *dirp, int &err) = 0;
54 virtual void Rewind(DIR *dirp, int &err) = 0;
55 virtual void Seek(DIR *dirp, long loc, int &err) = 0;
56 virtual long Tell(DIR *dirp, int &err) = 0;
59 #endif /* __Inc__IPerlDir___ */