Debian Codegraph @

docs/api_reference/C/envset_create_dir.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-&gt;set_create_dir()</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="env.html" title="Chapter 5.  The DB_ENV Handle" />
11 <link rel="prev" href="envset_data_len.html" title="DB_ENV-&gt;set_data_len()" />
12 <link rel="next" href="envset_encrypt.html" title="DB_ENV-&gt;set_encrypt()" />
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-&gt;set_create_dir()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envset_data_len.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 The DB_ENV Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envset_encrypt.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="envset_create_dir"></a>DB_ENV-&gt;set_create_dir()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;set_create_dir(DB_ENV *dbenv, const char *dir); </pre>
45 <p>
46 Sets the path of a directory to be used as the location to create the access
47 method database files. When the
48 <a class="xref" href="dbopen.html" title="DB-&gt;open()">DB-&gt;open()</a> function is used to
49 create a file it will be created relative to this path.
50 </p>
51 <p>
52 If no database directories are specified, database files will be created
53 either by absolute paths or relative to the environment home
54 directory. See
55 <a href="../../programmer_reference/env_naming.html" class="olink">Berkeley DB File Naming</a>
56 for more information.
57 </p>
58 <p>
59 The database environment's create directory may also be configured
60 using the environment's <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a> file. The
61 syntax of the entry in that file is a single line with the string
62 "set_create_dir", one or more whitespace characters, and the directory
63 name.
64 </p>
65 <p>
66 The <code class="methodname">DB_ENV-&gt;set_create_dir()</code> method configures operations performed
67 using the specified <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>
68 handle, not all operations performed on the underlying database environment.
69 </p>
70 <p>
71 The <code class="methodname">DB_ENV-&gt;set_create_dir()</code> method may be called at any time.
72 </p>
73 <p>
74 The <code class="methodname">DB_ENV-&gt;set_create_dir()</code> <span>
75 <span>
76 method returns a non-zero error value on failure and 0 on success.
77 </span>
78
79 </span>
80 </p>
81 <div class="sect2" lang="en" xml:lang="en">
82 <div class="titlepage">
83 <div>
84 <div>
85 <h3 class="title"><a id="idp51893992"></a>Parameters</h3>
86 </div>
87 </div>
88 </div>
89 <div class="sect3" lang="en" xml:lang="en">
90 <div class="titlepage">
91 <div>
92 <div>
93 <h4 class="title"><a id="idp51893344"></a>dir</h4>
94 </div>
95 </div>
96 </div>
97 <p>
98 The <span class="bold"><strong>dir</strong></span> parameter is a directory to
99 be used to create database files.
100 This directory must be one of the directories specified via a call to
101 <a class="xref" href="envadd_data_dir.html" title="DB_ENV-&gt;add_data_dir()">DB_ENV-&gt;add_data_dir()</a>
102 </p>
103 <p>
104 When using a Unicode build on Windows (the default), this argument will be interpreted
105 as a UTF-8 string, which is equivalent to ASCII for Latin characters.
106 </p>
107 </div>
108 </div>
109 <div class="sect2" lang="en" xml:lang="en">
110 <div class="titlepage">
111 <div>
112 <div>
113 <h3 class="title"><a id="idp51895968"></a>Errors</h3>
114 </div>
115 </div>
116 </div>
117 <p>
118 The <code class="methodname">DB_ENV-&gt;set_create_dir()</code> <span>
119 <span>
120 method may fail and return one of the following non-zero errors:
121 </span>
122
123 </span>
124 </p>
125 <div class="sect3" lang="en" xml:lang="en">
126 <div class="titlepage">
127 <div>
128 <div>
129 <h4 class="title"><a id="idp51901664"></a>EINVAL</h4>
130 </div>
131 </div>
132 </div>
133 <p>
134 If the method was called after <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a>
135 was called; or if an invalid flag value or parameter was specified.
136 </p>
137 </div>
138 </div>
139 <div class="sect2" lang="en" xml:lang="en">
140 <div class="titlepage">
141 <div>
142 <div>
143 <h3 class="title"><a id="idp51893184"></a>Class</h3>
144 </div>
145 </div>
146 </div>
147 <p>
148 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>
149 </p>
150 </div>
151 <div class="sect2" lang="en" xml:lang="en">
152 <div class="titlepage">
153 <div>
154 <div>
155 <h3 class="title"><a id="idp51903896"></a>See Also</h3>
156 </div>
157 </div>
158 </div>
159 <p>
160 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>
161 </p>
162 </div>
163 </div>
164 <div class="navfooter">
165 <hr />
166 <table width="100%" summary="Navigation footer">
167 <tr>
168 <td width="40%" align="left"><a accesskey="p" href="envset_data_len.html">Prev</a> </td>
169 <td width="20%" align="center">
170 <a accesskey="u" href="env.html">Up</a>
171 </td>
172 <td width="40%" align="right"> <a accesskey="n" href="envset_encrypt.html">Next</a></td>
173 </tr>
174 <tr>
175 <td width="40%" align="left" valign="top">DB_ENV-&gt;set_data_len() </td>
176 <td width="20%" align="center">
177 <a accesskey="h" href="index.html">Home</a>
178 </td>
179 <td width="40%" align="right" valign="top"> DB_ENV-&gt;set_encrypt()</td>
180 </tr>
181 </table>
182 </div>
183 </body>
184 </html>