Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>searchpath</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
searchpath
==========

Syntax
------

     #include <dir.h>
     
     char * searchpath(const char *file);

Description
-----------

Given a name of a file in FILE, searches for that file in a list of
directories, including the current working directory and those defined
in the PATH environment variable.

Return Value
------------

When successfull, the function returns a pointer to a static buffer
where the full pathname of the found file is stored.  Otherwise, it
returns NULL.

Example
-------

       printf("%s was found as %s\n", argv[1], searchpath(argv[1]));


Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson