~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/docs/api_c/env_set_tmp_dir.html

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--$Id: env_set_tmp_dir.so,v 10.7 2001/06/25 13:40:41 bostic Exp $-->
 
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
 
3
<!--All rights reserved.-->
 
4
<html>
 
5
<head>
 
6
<title>Berkeley DB: DB_ENV-&gt;set_tmp_dir</title>
 
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
 
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
 
9
</head>
 
10
<body bgcolor=white>
 
11
<a name="2"><!--meow--></a>
 
12
<table width="100%"><tr valign=top>
 
13
<td>
 
14
<h1>DB_ENV-&gt;set_tmp_dir</h1>
 
15
</td>
 
16
<td align=right>
 
17
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
18
</td></tr></table>
 
19
<hr size=1 noshade>
 
20
<tt>
 
21
<h3><pre>
 
22
#include &lt;db.h&gt;
 
23
<p>
 
24
int
 
25
DB_ENV-&gt;set_tmp_dir(DB_ENV *dbenv, const char *dir);
 
26
</pre></h3>
 
27
<h1>Description</h1>
 
28
<a name="3"><!--meow--></a>
 
29
<p>The path of a directory to be used as the location of temporary files.
 
30
The files created to back in-memory access method databases will be
 
31
created relative to this path.  These temporary files can be quite large,
 
32
depending on the size of the database.
 
33
<p>If no directories are specified, the following alternatives are checked
 
34
in the specified order.  The first existing directory path is used for
 
35
all temporary files.
 
36
<p><ol>
 
37
<p><li>The value of the environment variable <b>TMPDIR</b>.
 
38
<li>The value of the environment variable <b>TEMP</b>.
 
39
<li>The value of the environment variable <b>TMP</b>.
 
40
<li>The value of the environment variable <b>TempFolder</b>.
 
41
<li>The value returned by the GetTempPath interface.
 
42
<li>The directory <b>/var/tmp</b>.
 
43
<li>The directory <b>/usr/tmp</b>.
 
44
<li>The directory <b>/temp</b>.
 
45
<li>The directory <b>/tmp</b>.
 
46
<li>The directory <b>C:/temp</b>.
 
47
<li>The directory <b>C:/tmp</b>.
 
48
</ol>
 
49
<p>Note: environment variables are only checked if one of the
 
50
<a href="../api_c/env_open.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a> or <a href="../api_c/env_open.html#DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a> flags were
 
51
specified.
 
52
<p>Note: the GetTempPath interface is only checked on Win/32 platforms.
 
53
<p>The DB_ENV-&gt;set_tmp_dir interface may be used only to configure Berkeley DB before
 
54
the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> interface is called.
 
55
<p>The DB_ENV-&gt;set_tmp_dir function returns a non-zero error value on failure and 0 on success.
 
56
<p>The database environment's temporary file directory may also be set using the environment's
 
57
<b>DB_CONFIG</b> file.  The syntax of the entry in that file is a
 
58
single line with the string "set_tmp_dir", one or more whitespace characters,
 
59
and the directory name.  Because the <b>DB_CONFIG</b> file is read when the database
 
60
environment is opened, it will silently overrule configuration done
 
61
before that time.
 
62
<h1>Errors</h1>
 
63
<p>The DB_ENV-&gt;set_tmp_dir function may fail and return a non-zero error for the following conditions:
 
64
<p><dl compact>
 
65
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
 
66
<p>Called after <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> was called.
 
67
</dl>
 
68
<p>The DB_ENV-&gt;set_tmp_dir function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions.
 
69
If a catastrophic error has occurred, the DB_ENV-&gt;set_tmp_dir function may fail and return
 
70
<a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>, in which case all subsequent Berkeley DB calls will fail
 
71
in the same way.
 
72
<h1>See Also</h1>
 
73
<a href="../api_c/env_create.html">db_env_create</a>,
 
74
<a href="../api_c/env_close.html">DB_ENV-&gt;close</a>,
 
75
<a href="../api_c/env_err.html">DB_ENV-&gt;err</a>, <a href="../api_c/env_err.html">DB_ENV-&gt;errx</a>
 
76
<a href="../api_c/env_open.html">DB_ENV-&gt;open</a>,
 
77
<a href="../api_c/env_remove.html">DB_ENV-&gt;remove</a>,
 
78
<a href="../api_c/env_set_alloc.html">DB_ENV-&gt;set_alloc</a>,
 
79
<a href="../api_c/env_set_cachesize.html">DB_ENV-&gt;set_cachesize</a>,
 
80
<a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a>,
 
81
<a href="../api_c/env_set_errcall.html">DB_ENV-&gt;set_errcall</a>,
 
82
<a href="../api_c/env_set_errfile.html">DB_ENV-&gt;set_errfile</a>,
 
83
<a href="../api_c/env_set_errpfx.html">DB_ENV-&gt;set_errpfx</a>,
 
84
<a href="../api_c/env_set_feedback.html">DB_ENV-&gt;set_feedback</a>,
 
85
<a href="../api_c/env_set_flags.html">DB_ENV-&gt;set_flags</a>,
 
86
<a href="../api_c/env_set_mutexlocks.html">DB_ENV-&gt;set_mutexlocks</a>,
 
87
<a href="../api_c/env_set_pageyield.html">db_env_set_pageyield</a>,
 
88
<a href="../api_c/env_set_paniccall.html">DB_ENV-&gt;set_paniccall</a>,
 
89
<a href="../api_c/env_set_panicstate.html">db_env_set_panicstate</a>,
 
90
<a href="../api_c/env_set_rec_init.html">DB_ENV-&gt;set_recovery_init</a>,
 
91
<a href="../api_c/env_set_rpc_server.html">DB_ENV-&gt;set_rpc_server</a>,
 
92
<a href="../api_c/env_set_region_init.html">db_env_set_region_init</a>,
 
93
<a href="../api_c/env_set_shm_key.html">DB_ENV-&gt;set_shm_key</a>,
 
94
<a href="../api_c/env_set_tas_spins.html">db_env_set_tas_spins</a>,
 
95
<a href="../api_c/env_set_tmp_dir.html">DB_ENV-&gt;set_tmp_dir</a>,
 
96
<a href="../api_c/env_set_verbose.html">DB_ENV-&gt;set_verbose</a>,
 
97
<a href="../api_c/env_strerror.html">db_strerror</a>
 
98
and
 
99
<a href="../api_c/env_version.html">db_version</a>.
 
100
</tt>
 
101
<table width="100%"><tr><td><br></td><td align=right>
 
102
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
103
</td></tr></table>
 
104
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
105
</body>
 
106
</html>