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->get_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="db.html" title="Chapter��2.�� The DB Handle" /> 11 <link rel="prev" href="dbget_cachesize.html" title="DB->get_cachesize()" /> 12 <link rel="next" href="dbget_dbname.html" title="DB->get_dbname()" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">DB->get_create_dir()</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="dbget_cachesize.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��2.�� 23 The DB Handle 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="dbget_dbname.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="dbget_create_dir"></a>DB->get_create_dir()</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">#include <db.h> 39 40int 41DB->get_create_dir(DB *db, const char **dirp); </pre> 42 <p> 43 Determine which directory a database file will be created in or was found in. 44 </p> 45 <p> 46 The <code class="methodname">DB->get_create_dir()</code> method may be called at any time. 47 </p> 48 <p> 49 The <code class="methodname">DB->get_create_dir()</code> <span> 50 <span> 51 method returns a non-zero error value on failure and 0 on success. 52 </span> 53 54 </span> 55 </p> 56 <div class="sect2" lang="en" xml:lang="en"> 57 <div class="titlepage"> 58 <div> 59 <div> 60 <h3 class="title"><a id="id1635625"></a>Parameters</h3> 61 </div> 62 </div> 63 </div> 64 <div class="sect3" lang="en" xml:lang="en"> 65 <div class="titlepage"> 66 <div> 67 <div> 68 <h4 class="title"><a id="id1635864"></a>dirp</h4> 69 </div> 70 </div> 71 </div> 72 <p> 73 The <span class="bold"><strong>dirp</strong></span> will be set to the directory 74 specified in the call to <a class="xref" href="dbset_create_dir.html" title="DB->set_create_dir()">DB->set_create_dir()</a> 75 method on this handle or to the directory that the database was found in 76 after <a class="xref" href="dbopen.html" title="DB->open()">DB->open()</a> has been called. 77 </p> 78 </div> 79 </div> 80 <div class="sect2" lang="en" xml:lang="en"> 81 <div class="titlepage"> 82 <div> 83 <div> 84 <h3 class="title"><a id="id1636022"></a>Errors</h3> 85 </div> 86 </div> 87 </div> 88 <p> 89 The <code class="methodname">DB->get_create_dir()</code> <span> 90 <span> 91 method may fail and return one of the following non-zero errors: 92 </span> 93 94 </span> 95 </p> 96 <div class="sect3" lang="en" xml:lang="en"> 97 <div class="titlepage"> 98 <div> 99 <div> 100 <h4 class="title"><a id="id1635872"></a>EINVAL</h4> 101 </div> 102 </div> 103 </div> 104 <p> 105 An invalid flag value or parameter was specified. 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="id1636004"></a>Class</h3> 114 </div> 115 </div> 116 </div> 117 <p> 118 <a class="link" href="db.html" title="Chapter��2.�� The DB Handle">DB</a> 119 </p> 120 </div> 121 <div class="sect2" lang="en" xml:lang="en"> 122 <div class="titlepage"> 123 <div> 124 <div> 125 <h3 class="title"><a id="id1636030"></a>See Also</h3> 126 </div> 127 </div> 128 </div> 129 <p> 130 <a class="xref" href="db.html#dblist" title="Database and Related Methods">Database and Related Methods</a> 131 </p> 132 </div> 133 </div> 134 <div class="navfooter"> 135 <hr /> 136 <table width="100%" summary="Navigation footer"> 137 <tr> 138 <td width="40%" align="left"><a accesskey="p" href="dbget_cachesize.html">Prev</a>��</td> 139 <td width="20%" align="center"> 140 <a accesskey="u" href="db.html">Up</a> 141 </td> 142 <td width="40%" align="right">��<a accesskey="n" href="dbget_dbname.html">Next</a></td> 143 </tr> 144 <tr> 145 <td width="40%" align="left" valign="top">DB->get_cachesize()��</td> 146 <td width="20%" align="center"> 147 <a accesskey="h" href="index.html">Home</a> 148 </td> 149 <td width="40%" align="right" valign="top">��DB->get_dbname()</td> 150 </tr> 151 </table> 152 </div> 153 </body> 154</html> 155