[ < ] [ > ]   [ << ] [ 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:

Name

Type

Description

---

---

---------

path

char const*

colon separated list of search directories

file

char const*

the name of the file to look for

mode

char const*

the mode bits that must be set to match

returns

char*

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.


This document was generated by Bruce Korb on October, 7 2007 using texi2html 1.76.

Viewable With Any Browser   autogen Home