| www.delorie.com/djgpp/doc/libc-2.01/libc_556.html | search |
#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]));
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |