Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / ep / ep_file_search.h @ master

History | View | Annotate | Download (1.85 KB)

1 06dbdf8b Eric Allman
/* vim: set ai sw=8 sts=8 ts=8 :*/
2
3
/***********************************************************************
4
**  ----- BEGIN LICENSE BLOCK -----
5
**        LIBEP: Enhanced Portability Library (Reduced Edition)
6
**
7 c87dd166 Eric Allman
**        Copyright (c) 2008-2019, Eric P. Allman.  All rights reserved.
8
**        Copyright (c) 2015-2019, Regents of the University of California.
9 06dbdf8b Eric Allman
**        All rights reserved.
10
**
11
**        Permission is hereby granted, without written agreement and without
12
**        license or royalty fees, to use, copy, modify, and distribute this
13
**        software and its documentation for any purpose, provided that the above
14
**        copyright notice and the following two paragraphs appear in all copies
15
**        of this software.
16
**
17
**        IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
18
**        SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
19
**        PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
20
**        EVEN IF REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
**
22
**        REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
23
**        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24
**        FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION,
25
**        IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO
26
**        OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
27
**        OR MODIFICATIONS.
28
**  ----- END LICENSE BLOCK -----
29
***********************************************************************/
30
31
#ifndef _EP_FILE_SEARCH_H_
32
#define _EP_FILE_SEARCH_H_
33
#include <ep/ep.h>
34
__BEGIN_DECLS
35
36
/*
37
**  Search for a file or directory within a search path.
38
**        `fname` can be NULL, which is similar to ".".
39
*/
40
41
extern EP_STAT        ep_file_search(
42
                        const char *search_path,        // directory path
43
                        const char *fname,                // file/dir name in path
44
                        size_t fnbuf_len,                // len of output buf
45
                        char *fnbuf);                        // output buffer
46
47
__END_DECLS
48
#endif // _EP_FILE_SEARCH_H_