[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.6.32.17 pathfind

fild a file in a list of directories

Usage:

 
char* res = pathfind( path, file, mode );

Where the arguments are:

NameTypeDescription
—–—–————-
pathchar const*colon separated list of search directories
filechar const*the name of the file to look for
modechar const*the mode bits that must be set to match
returnschar*the path to the located file

pathfind looks for a a file with name "FILE" and "MODE" access along colon delimited "PATH", and returns the full pathname as a string, or NULL if not found. If "FILE" contains a slash, then it is treated as a relative or absolute path and "PATH" is ignored.

NOTE: this function is compiled into ‘libopts’ only if it is not natively supplied.

The "MODE" argument is a string of option letters chosen from the list below:

 
Letter    Meaning
r         readable
w         writable
x         executable
f         normal file       (NOT IMPLEMENTED)
b         block special     (NOT IMPLEMENTED)
c         character special (NOT IMPLEMENTED)
d         directory         (NOT IMPLEMENTED)
p         FIFO (pipe)       (NOT IMPLEMENTED)
u         set user ID bit   (NOT IMPLEMENTED)
g         set group ID bit  (NOT IMPLEMENTED)
k         sticky bit        (NOT IMPLEMENTED)
s         size nonzero      (NOT IMPLEMENTED)

returns NULL if the file is not found.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Bruce Korb on February 17, 2011 using texi2html 1.82.

Viewable With Any Browser   autogen Home