File: classwx_temp_file.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (336 lines) | stat: -rw-r--r-- 25,574 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: wxTempFile Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
 <tbody>
 <tr>
  <td id="projectlogo">
    <a href="http://www.wxwidgets.org/" target="_new">
      <img alt="wxWidgets" src="logo.png"/>
    </a>
  </td>
  <td style="padding-left: 0.5em; text-align: right;">
   <span id="projectnumber">Version: 3.0.2</span>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Categories</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classwx_temp_file-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">wxTempFile Class Reference<div class="ingroups"><a class="el" href="group__group__class__file.html">File Handling</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;wx/file.h&gt;</code></p>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classwx_temp_file.html" title="wxTempFile provides a relatively safe way to replace the contents of the existing file...">wxTempFile</a> provides a relatively safe way to replace the contents of the existing file. </p>
<p>The name is explained by the fact that it may be also used as just a temporary file if you don't replace the old file contents.</p>
<p>Usually, when a program replaces the contents of some file it first opens it for writing, thus losing all of the old data and then starts recreating it. This approach is not very safe because during the regeneration of the file bad things may happen: the program may find that there is an internal error preventing it from completing file generation, the user may interrupt it (especially if file generation takes long time) and, finally, any other external interrupts (power supply failure or a disk error) will leave you without either the original file or the new one.</p>
<p><a class="el" href="classwx_temp_file.html" title="wxTempFile provides a relatively safe way to replace the contents of the existing file...">wxTempFile</a> addresses this problem by creating a temporary file which is meant to replace the original file - but only after it is fully written. So, if the user interrupts the program during the file generation, the old file won't be lost. Also, if the program discovers itself that it doesn't want to replace the old file there is no problem - in fact, <a class="el" href="classwx_temp_file.html" title="wxTempFile provides a relatively safe way to replace the contents of the existing file...">wxTempFile</a> will <b>not</b> replace the old file by default, you should explicitly call <a class="el" href="classwx_temp_file.html#a3483386ef70cd83a2919054a681f2892" title="Validate changes: deletes the old file of name m_strName and renames the new file to the old name...">wxTempFile::Commit()</a> to do it. Calling <a class="el" href="classwx_temp_file.html#ae4154e93bcd87a48293e38666e2e10a8" title="Discard changes: the old file contents are not changed, the temporary file is deleted.">wxTempFile::Discard()</a> explicitly discards any modifications: it closes and deletes the temporary file and leaves the original file unchanged. If you call neither <a class="el" href="classwx_temp_file.html#a3483386ef70cd83a2919054a681f2892" title="Validate changes: deletes the old file of name m_strName and renames the new file to the old name...">Commit()</a> nor <a class="el" href="classwx_temp_file.html#ae4154e93bcd87a48293e38666e2e10a8" title="Discard changes: the old file contents are not changed, the temporary file is deleted.">Discard()</a>, the destructor will call <a class="el" href="classwx_temp_file.html#ae4154e93bcd87a48293e38666e2e10a8" title="Discard changes: the old file contents are not changed, the temporary file is deleted.">Discard()</a> automatically.</p>
<p>To summarize: if you want to replace another file, create an instance of <a class="el" href="classwx_temp_file.html" title="wxTempFile provides a relatively safe way to replace the contents of the existing file...">wxTempFile</a> passing the name of the file to be replaced to the constructor. (You may also use default constructor and pass the file name to <a class="el" href="classwx_temp_file.html#a9c6a42adfae433ce7928fb77ac769291" title="Open the temporary file, returns true on success, false if an error occurred.">wxTempFile::Open</a>.) Then you can write to <a class="el" href="classwx_temp_file.html" title="wxTempFile provides a relatively safe way to replace the contents of the existing file...">wxTempFile</a> using wxFile-like functions and later call <a class="el" href="classwx_temp_file.html#a3483386ef70cd83a2919054a681f2892" title="Validate changes: deletes the old file of name m_strName and renames the new file to the old name...">wxTempFile::Commit()</a> to replace the old file (and close this one) or call <a class="el" href="classwx_temp_file.html#ae4154e93bcd87a48293e38666e2e10a8" title="Discard changes: the old file contents are not changed, the temporary file is deleted.">wxTempFile::Discard()</a> to cancel the modifications.</p>
<h2></h2>
<div><span class="lib">Library:</span>&#160;&#160;<span class="lib_text"><a class="el" href="page_libs.html#page_libs_wxbase">wxBase</a></span></div><div><span class="category">Category:</span>&#160;&#160;<span class="category_text"><a class="el" href="group__group__class__file.html">File Handling</a></span></div> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3eb3d2c6bab845067b40f29159198a82"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#a3eb3d2c6bab845067b40f29159198a82">wxTempFile</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;strName)</td></tr>
<tr class="memdesc:a3eb3d2c6bab845067b40f29159198a82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associates <a class="el" href="classwx_temp_file.html" title="wxTempFile provides a relatively safe way to replace the contents of the existing file...">wxTempFile</a> with the file to be replaced and opens it.  <a href="#a3eb3d2c6bab845067b40f29159198a82"></a><br/></td></tr>
<tr class="separator:a3eb3d2c6bab845067b40f29159198a82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64b32458252f16d9e2de51e3528ac5ea"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#a64b32458252f16d9e2de51e3528ac5ea">~wxTempFile</a> ()</td></tr>
<tr class="memdesc:a64b32458252f16d9e2de51e3528ac5ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor calls <a class="el" href="classwx_temp_file.html#ae4154e93bcd87a48293e38666e2e10a8" title="Discard changes: the old file contents are not changed, the temporary file is deleted.">Discard()</a> if temporary file is still open.  <a href="#a64b32458252f16d9e2de51e3528ac5ea"></a><br/></td></tr>
<tr class="separator:a64b32458252f16d9e2de51e3528ac5ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3483386ef70cd83a2919054a681f2892"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#a3483386ef70cd83a2919054a681f2892">Commit</a> ()</td></tr>
<tr class="memdesc:a3483386ef70cd83a2919054a681f2892"><td class="mdescLeft">&#160;</td><td class="mdescRight">Validate changes: deletes the old file of name m_strName and renames the new file to the old name.  <a href="#a3483386ef70cd83a2919054a681f2892"></a><br/></td></tr>
<tr class="separator:a3483386ef70cd83a2919054a681f2892"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4154e93bcd87a48293e38666e2e10a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#ae4154e93bcd87a48293e38666e2e10a8">Discard</a> ()</td></tr>
<tr class="memdesc:ae4154e93bcd87a48293e38666e2e10a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Discard changes: the old file contents are not changed, the temporary file is deleted.  <a href="#ae4154e93bcd87a48293e38666e2e10a8"></a><br/></td></tr>
<tr class="separator:ae4154e93bcd87a48293e38666e2e10a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76e49e860b868a53a4dbcae2a2965e09"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#a76e49e860b868a53a4dbcae2a2965e09">Flush</a> ()</td></tr>
<tr class="memdesc:a76e49e860b868a53a4dbcae2a2965e09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flush the data written to the file to disk.  <a href="#a76e49e860b868a53a4dbcae2a2965e09"></a><br/></td></tr>
<tr class="separator:a76e49e860b868a53a4dbcae2a2965e09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1ae23eeff613f655c746d2a9836a79c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#aa1ae23eeff613f655c746d2a9836a79c">IsOpened</a> () const </td></tr>
<tr class="memdesc:aa1ae23eeff613f655c746d2a9836a79c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns <span class="literal">true</span> if the file was successfully opened.  <a href="#aa1ae23eeff613f655c746d2a9836a79c"></a><br/></td></tr>
<tr class="separator:aa1ae23eeff613f655c746d2a9836a79c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9914d26a3ae35ca69c438cfb07d9a9a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__funcmacro__file.html#ga69d831b3febabc149c67b716c8e22de5">wxFileOffset</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#a9914d26a3ae35ca69c438cfb07d9a9a9">Length</a> () const </td></tr>
<tr class="memdesc:a9914d26a3ae35ca69c438cfb07d9a9a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the length of the file.  <a href="#a9914d26a3ae35ca69c438cfb07d9a9a9"></a><br/></td></tr>
<tr class="separator:a9914d26a3ae35ca69c438cfb07d9a9a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c6a42adfae433ce7928fb77ac769291"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#a9c6a42adfae433ce7928fb77ac769291">Open</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;strName)</td></tr>
<tr class="memdesc:a9c6a42adfae433ce7928fb77ac769291"><td class="mdescLeft">&#160;</td><td class="mdescRight">Open the temporary file, returns <span class="literal">true</span> on success, <span class="literal">false</span> if an error occurred.  <a href="#a9c6a42adfae433ce7928fb77ac769291"></a><br/></td></tr>
<tr class="separator:a9c6a42adfae433ce7928fb77ac769291"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3d5fd185404cab6431500cd0019988f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__funcmacro__file.html#ga69d831b3febabc149c67b716c8e22de5">wxFileOffset</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#ab3d5fd185404cab6431500cd0019988f">Seek</a> (<a class="el" href="group__group__funcmacro__file.html#ga69d831b3febabc149c67b716c8e22de5">wxFileOffset</a> ofs, <a class="el" href="group__group__funcmacro__file.html#gae3981f8632f0391e5c852bf62eb982b0">wxSeekMode</a> mode=<a class="el" href="group__group__funcmacro__file.html#ggae3981f8632f0391e5c852bf62eb982b0afe95aa5f8bbda276d20a0860a2af841d">wxFromStart</a>)</td></tr>
<tr class="memdesc:ab3d5fd185404cab6431500cd0019988f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seeks to the specified position.  <a href="#ab3d5fd185404cab6431500cd0019988f"></a><br/></td></tr>
<tr class="separator:ab3d5fd185404cab6431500cd0019988f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b930c371b6546950903949f6000dc13"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__group__funcmacro__file.html#ga69d831b3febabc149c67b716c8e22de5">wxFileOffset</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#a7b930c371b6546950903949f6000dc13">Tell</a> () const </td></tr>
<tr class="memdesc:a7b930c371b6546950903949f6000dc13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current position or <a class="el" href="group__group__funcmacro__file.html#gab184c7199d93541d22ae42e515cbbcb7" title="A special return value of many wxWidgets classes to indicate that an invalid offset was given...">wxInvalidOffset</a> if file is not opened or if another error occurred.  <a href="#a7b930c371b6546950903949f6000dc13"></a><br/></td></tr>
<tr class="separator:a7b930c371b6546950903949f6000dc13"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40b4547f8c20673ea38e84b8a6a7eb02"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classwx_temp_file.html#a40b4547f8c20673ea38e84b8a6a7eb02">Write</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;str, const <a class="el" href="classwx_m_b_conv.html">wxMBConv</a> &amp;conv=wxConvUTF8)</td></tr>
<tr class="memdesc:a40b4547f8c20673ea38e84b8a6a7eb02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write to the file, return <span class="literal">true</span> on success, <span class="literal">false</span> on failure.  <a href="#a40b4547f8c20673ea38e84b8a6a7eb02"></a><br/></td></tr>
<tr class="separator:a40b4547f8c20673ea38e84b8a6a7eb02"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3eb3d2c6bab845067b40f29159198a82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxTempFile::wxTempFile </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>strName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Associates <a class="el" href="classwx_temp_file.html" title="wxTempFile provides a relatively safe way to replace the contents of the existing file...">wxTempFile</a> with the file to be replaced and opens it. </p>
<dl class="section warning"><dt>Warning</dt><dd>You should use <a class="el" href="classwx_temp_file.html#aa1ae23eeff613f655c746d2a9836a79c" title="Returns true if the file was successfully opened.">IsOpened()</a> to verify that the constructor succeeded. </dd></dl>

</div>
</div>
<a class="anchor" id="a64b32458252f16d9e2de51e3528ac5ea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">wxTempFile::~wxTempFile </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destructor calls <a class="el" href="classwx_temp_file.html#ae4154e93bcd87a48293e38666e2e10a8" title="Discard changes: the old file contents are not changed, the temporary file is deleted.">Discard()</a> if temporary file is still open. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a3483386ef70cd83a2919054a681f2892"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxTempFile::Commit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Validate changes: deletes the old file of name m_strName and renames the new file to the old name. </p>
<p>Returns <span class="literal">true</span> if both actions succeeded.</p>
<p>If <span class="literal">false</span> is returned it may unfortunately mean two quite different things: either that the old file couldn't be deleted or that the new file couldn't be renamed to the old name. </p>

</div>
</div>
<a class="anchor" id="ae4154e93bcd87a48293e38666e2e10a8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxTempFile::Discard </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Discard changes: the old file contents are not changed, the temporary file is deleted. </p>

</div>
</div>
<a class="anchor" id="a76e49e860b868a53a4dbcae2a2965e09"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxTempFile::Flush </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flush the data written to the file to disk. </p>
<p>This simply calls <a class="el" href="classwx_file.html#a0b3ac667c1e6133c6c4ffce3c81b3c4c" title="Flushes the file descriptor.">wxFile::Flush()</a> for the underlying file and may be necessary with file systems such as XFS and Ext4 under Linux. Calling this function may however have serious performance implications and also is not necessary with many other file systems so it is not done by default &ndash; but you can call it before calling <a class="el" href="classwx_temp_file.html#a3483386ef70cd83a2919054a681f2892" title="Validate changes: deletes the old file of name m_strName and renames the new file to the old name...">Commit()</a> to absolutely ensure that the data was indeed written to the disk correctly. </p>

</div>
</div>
<a class="anchor" id="aa1ae23eeff613f655c746d2a9836a79c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxTempFile::IsOpened </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns <span class="literal">true</span> if the file was successfully opened. </p>

</div>
</div>
<a class="anchor" id="a9914d26a3ae35ca69c438cfb07d9a9a9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__funcmacro__file.html#ga69d831b3febabc149c67b716c8e22de5">wxFileOffset</a> wxTempFile::Length </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the length of the file. </p>
<p>This method may return <a class="el" href="group__group__funcmacro__file.html#gab184c7199d93541d22ae42e515cbbcb7" title="A special return value of many wxWidgets classes to indicate that an invalid offset was given...">wxInvalidOffset</a> if the length couldn't be determined or 0 even for non-empty files if the file is not seekable.</p>
<p>In general, the only way to determine if the file for which this function returns 0 is really empty or not is to try reading from it. </p>

</div>
</div>
<a class="anchor" id="a9c6a42adfae433ce7928fb77ac769291"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxTempFile::Open </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>strName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Open the temporary file, returns <span class="literal">true</span> on success, <span class="literal">false</span> if an error occurred. </p>
<p><em>strName</em> is the name of file to be replaced. The temporary file is always created in the directory where <em>strName</em> is. In particular, if <em>strName</em> doesn't include the path, it is created in the current directory and the program should have write access to it for the function to succeed. </p>

</div>
</div>
<a class="anchor" id="ab3d5fd185404cab6431500cd0019988f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__funcmacro__file.html#ga69d831b3febabc149c67b716c8e22de5">wxFileOffset</a> wxTempFile::Seek </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__group__funcmacro__file.html#ga69d831b3febabc149c67b716c8e22de5">wxFileOffset</a>&#160;</td>
          <td class="paramname"><em>ofs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__group__funcmacro__file.html#gae3981f8632f0391e5c852bf62eb982b0">wxSeekMode</a>&#160;</td>
          <td class="paramname"><em>mode</em> = <code><a class="el" href="group__group__funcmacro__file.html#ggae3981f8632f0391e5c852bf62eb982b0afe95aa5f8bbda276d20a0860a2af841d">wxFromStart</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Seeks to the specified position. </p>

</div>
</div>
<a class="anchor" id="a7b930c371b6546950903949f6000dc13"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__group__funcmacro__file.html#ga69d831b3febabc149c67b716c8e22de5">wxFileOffset</a> wxTempFile::Tell </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the current position or <a class="el" href="group__group__funcmacro__file.html#gab184c7199d93541d22ae42e515cbbcb7" title="A special return value of many wxWidgets classes to indicate that an invalid offset was given...">wxInvalidOffset</a> if file is not opened or if another error occurred. </p>

</div>
</div>
<a class="anchor" id="a40b4547f8c20673ea38e84b8a6a7eb02"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxTempFile::Write </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classwx_m_b_conv.html">wxMBConv</a> &amp;&#160;</td>
          <td class="paramname"><em>conv</em> = <code>wxConvUTF8</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Write to the file, return <span class="literal">true</span> on success, <span class="literal">false</span> on failure. </p>
<p>The second argument is only meaningful in Unicode build of wxWidgets when <em>conv</em> is used to convert <em>str</em> to multibyte representation. </p>

</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:47:00 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
	</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>