fnpathfind man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

FNPATHFIND(3)		     C Programmer's Manual		 FNPATHFIND(3)

NAME
       fnpathfind - find a file in a list of directories

SYNOPSIS
       #include <publib.h>

       int fnpathfind(const char *path, const char *tgt,
			    char *res, size_t max);

DESCRIPTION
       pathfind	 looks	for  a	file  in  a list of directories.  The argument
       `path' is a colon separated list of directories, typically the contents
       of an environment variable like PATH, MANPATH, or CDPATH.  The function
       will go through the directories in the path and look in each  directory
       for a file given in argument `target' until it finds it.	 Only an exact
       match is reported, no wild cards or globbing.

       The names that are matched are formed by taking	an  element  from  the
       path  and  prepending it to target.  An empty element means the current
       directory, as does the name ".".

       The function returns -1 for failure (not found or error), or the	 total
       size  for  the  full  name  (the full name may have been truncated when
       stored into result).

BUGS
       The function uses dynamic memory allocation and may therefore fail  due
       to insufficient memory.

       It  is  not  trivial to know in which directory the search ended.  This
       makes is difficult to continue the search.

SEE ALSO
       publib(3), fname(3)

AUTHOR
       Lars Wirzenius (lars.wirzenius@helsinki.fi)

Publib			     C Programmer's Manual		 FNPATHFIND(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net