Debian Codegraph @

docs/api_reference/C/db_env_set_func_dirlist.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>db_env_set_func_dirlist</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10 <link rel="up" href="setfunc.html" title="Appendix C.  Berkeley DB Application Space Static Functions" />
11 <link rel="prev" href="db_env_set_func_dirfree.html" title="db_env_set_func_dirfree" />
12 <link rel="next" href="db_env_set_func_exists.html" title="db_env_set_func_exists" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">db_env_set_func_dirlist</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="db_env_set_func_dirfree.html">Prev</a> </td>
25 <th width="60%" align="center">Appendix C. 
26 Berkeley DB Application Space Static Functions
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="db_env_set_func_exists.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="db_env_set_func_dirlist"></a>db_env_set_func_dirlist</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 db_env_set_func_dirlist(int (*func_dirlist)(const char *dir,
45 char ***namesp, int *cntp)); </pre>
46 <p>
47 The Berkeley DB library requires the ability to read through a
48 directory and create a list of files that the directory contains.
49 </p>
50 <p>
51 The db_env_set_func_dirlist method configures all operations performed
52 by a process and all of its threads of control, not operations
53 confined to a single database environment.
54 </p>
55 <p>
56 Although the db_env_set_func_dirlist method may be called at any time
57 during the life of the application, it should normally be called
58 before making calls to the <a class="xref" href="envcreate.html" title="db_env_create">db_env_create</a> or
59 <a class="xref" href="dbcreate.html" title="db_create">db_create</a> methods.
60 </p>
61 <p>
62 The <code class="function">db_env_set_func_dirlist()</code> <span>
63 function returns a non-zero error value on failure and 0 on success.
64 </span>
65 </p>
66 <div class="sect2" lang="en" xml:lang="en">
67 <div class="titlepage">
68 <div>
69 <div>
70 <h3 class="title"><a id="idp55576576"></a>Parameters</h3>
71 </div>
72 </div>
73 </div>
74 <div class="sect3" lang="en" xml:lang="en">
75 <div class="titlepage">
76 <div>
77 <div>
78 <h4 class="title"><a id="idp55576768"></a>func_dirlist</h4>
79 </div>
80 </div>
81 </div>
82 <p>
83 The <span class="bold"><strong>func_dirlist</strong></span> parameter is the
84 function which reads through a directory and returns a list of the
85 files it contains.
86 </p>
87 <p>
88 The <span class="bold"><strong>dir</strong></span> parameter to this function is
89 the name of the directory to be searched.
90 </p>
91 <p>
92 The function must return a pointer to an array of nul-terminated file
93 names into the memory location to which the <span class="bold"><strong>namesp</strong></span> parameter refers, and a count of the
94 number of elements in the array into the memory location to which
95 <span class="bold"><strong>cntp</strong></span> refers.
96 </p>
97 </div>
98 </div>
99 <div class="sect2" lang="en" xml:lang="en">
100 <div class="titlepage">
101 <div>
102 <div>
103 <h3 class="title"><a id="idp55572240"></a>See Also</h3>
104 </div>
105 </div>
106 </div>
107 <p>
108 <a href="../../programmer_reference/program_runtime.html" class="olink">Run-time configuration</a>
109
110 </p>
111 </div>
112 </div>
113 <div class="navfooter">
114 <hr />
115 <table width="100%" summary="Navigation footer">
116 <tr>
117 <td width="40%" align="left"><a accesskey="p" href="db_env_set_func_dirfree.html">Prev</a> </td>
118 <td width="20%" align="center">
119 <a accesskey="u" href="setfunc.html">Up</a>
120 </td>
121 <td width="40%" align="right"> <a accesskey="n" href="db_env_set_func_exists.html">Next</a></td>
122 </tr>
123 <tr>
124 <td width="40%" align="left" valign="top">db_env_set_func_dirfree </td>
125 <td width="20%" align="center">
126 <a accesskey="h" href="index.html">Home</a>
127 </td>
128 <td width="40%" align="right" valign="top"> db_env_set_func_exists</td>
129 </tr>
130 </table>
131 </div>
132 </body>
133 </html>