• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/db-4.8.30/docs/api_reference/C/
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_exists</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��3.�� Berkeley DB Application Space Static Functions" />
11    <link rel="prev" href="db_env_set_func_dirlist.html" title="db_env_set_func_dirlist" />
12    <link rel="next" href="db_env_set_func_file_map.html" title="db_env_set_func_file_map" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">db_env_set_func_exists</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="db_env_set_func_dirlist.html">Prev</a>��</td>
22          <th width="60%" align="center">Appendix��3.��
23                Berkeley DB Application Space Static Functions
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="db_env_set_func_file_map.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="db_env_set_func_exists"></a>db_env_set_func_exists</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41db_env_set_func_exists(int (*func_exists)(const char *path, int *isdirp));  </pre>
42      <p>
43         The Berkeley DB library requires the ability to determine whether a
44         file exists and whether it is a file of type directory.
45    </p>
46      <p>
47         The <code class="function">db_env_set_func_exists()</code> function configures all operations performed
48         by a process and all of its threads of control, not operations
49         confined to a single database environment.
50    </p>
51      <p>
52         Although the <code class="function">db_env_set_func_exists()</code> function may be called at any time
53         during the life of the application, it should normally be called
54         before making calls to the <a class="xref" href="envcreate.html" title="db_env_create">db_env_create</a> or
55         <a class="xref" href="dbcreate.html" title="db_create">db_create</a> methods.
56    </p>
57      <p>
58         The <code class="function">db_env_set_func_exists()</code> <span>
59                  function returns a non-zero error value on failure and 0 on success.
60            </span>
61    </p>
62      <div class="sect2" lang="en" xml:lang="en">
63        <div class="titlepage">
64          <div>
65            <div>
66              <h3 class="title"><a id="id1718329"></a>Parameters</h3>
67            </div>
68          </div>
69        </div>
70        <div class="sect3" lang="en" xml:lang="en">
71          <div class="titlepage">
72            <div>
73              <div>
74                <h4 class="title"><a id="id1718708"></a>func_exists</h4>
75              </div>
76            </div>
77          </div>
78          <p>
79                          The <span class="bold"><strong>func_exists</strong></span> parameter is the
80                          function which returns if a file exists and if it is a file of type
81                          directory.
82                     </p>
83          <p>
84                          The <span class="bold"><strong>path</strong></span> parameter to this function
85                          is the pathname of the file to be checked.
86                     </p>
87          <p>
88                          If the <span class="bold"><strong>isdirp</strong></span> parameter is non-NULL,
89                          it must be set to non-0 if <span class="bold"><strong>path</strong></span> is a
90                          directory, and 0 if <span class="bold"><strong>path</strong></span> is not a
91                          directory.
92                     </p>
93          <p>
94                          The <span class="bold"><strong>func_exists</strong></span> function must return
95                          the value of <span class="bold"><strong>errno</strong></span> on failure and 0
96                          on success.
97                     </p>
98        </div>
99      </div>
100      <div class="sect2" lang="en" xml:lang="en">
101        <div class="titlepage">
102          <div>
103            <div>
104              <h3 class="title"><a id="id1719019"></a>See Also</h3>
105            </div>
106          </div>
107        </div>
108        <p>
109          <a href="../../programmer_reference/program_runtime.html" class="olink">Run-time configuration</a>
110
111     </p>
112      </div>
113    </div>
114    <div class="navfooter">
115      <hr />
116      <table width="100%" summary="Navigation footer">
117        <tr>
118          <td width="40%" align="left"><a accesskey="p" href="db_env_set_func_dirlist.html">Prev</a>��</td>
119          <td width="20%" align="center">
120            <a accesskey="u" href="setfunc.html">Up</a>
121          </td>
122          <td width="40%" align="right">��<a accesskey="n" href="db_env_set_func_file_map.html">Next</a></td>
123        </tr>
124        <tr>
125          <td width="40%" align="left" valign="top">db_env_set_func_dirlist��</td>
126          <td width="20%" align="center">
127            <a accesskey="h" href="index.html">Home</a>
128          </td>
129          <td width="40%" align="right" valign="top">��db_env_set_func_file_map</td>
130        </tr>
131      </table>
132    </div>
133  </body>
134</html>
135