BOOTSTRAP (kutils) functions


LIBRARY ROUTINE

klist_dirlist - create a linked list of file names

LIBRARY CALL

klist *klist_dirlist(
   char *basename,
   char *global_dir,
   char *filter,
   int  list_mode,
   int  format)

INPUT

OUTPUT

none

RETURN VALUE

A link list of strings to filenames that match the basename

DESCRIPTION

This module is used to create a linked list of file names according to a user supplied basename and an initial global directory. The list mode is used to indicate what we are going to list in the directory. The possible defines are listed in $KHOROS/include/khoros/kdefines.h. The following symbols are the current list mode:

KPATH - prepend the path to each file KFILE - list plain text files KDIR - list directories KDOT - list dot files KLINK - list symbolic files KSOCK - list socket files KREAD - file is readable by caller KWRITE - file is writable by caller KEXEC - file is executable by caller

The selections are or'ed together in order to choose the set of attributes that are desired. (e.g KFILE | KDIR) will list only files and directories that match the basename.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$BOOTSTRAP/objects/library/kutils/src/list.c

SEE ALSO

kutils(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.