The "dir" Package
These routines are meant to provide an enhanced, portable method for
scanning directories and automatically obtaining file status information.
Library: karma
Link With: -lkarma
Functions
Tables
Functions
KDir
dir_open (CONST char *dirname)
Open a directory for reading (scanning).
Parameters:
- dirname :
The directory name.
Returns: A KDir object on success, else NULL.
Multithreading Level: Unsafe
KFileInfo *
dir_read (KDir dir, unsigned int skip_control)
Read (scan) a directory for files.
Parameters:
- dir :
The directory object.
- skip_control :
Determines whether or not to skip the special files: "."
and "..". See dir_SKIP_VALUES for a list of legal values.
Returns: A pointer to a KFileInfo structure on success, else NULL.
The data in this structure is valid until the next call to dir_read or
dir_close with this directory object.
Multithreading Level: Unsafe
void
dir_close (KDir dir)
Close a directory.
Parameters:
- dir :
The directory object.
Returns: Nothing.
Multithreading Level: Unsafe
Tables
dir_SKIP_VALUES
Mode | Meaning
|
KDIR_DOT | Pass ".", skip ".."
|
KDIR_DOTDOT | Pass "..", skip "."
|
KDIR_DOT_AND_DOTDOT | Pass "." and ".."
|
KDIR_NO_DOTS | Skip "." and ".."
|
Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services