Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / beast / doc / html / beast / ref / boost__beast__file_mode.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>file_mode</title>
5 <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Beast">
8 <link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
9 <link rel="prev" href="boost__beast__file/write.html" title="file::write">
10 <link rel="next" href="boost__beast__file_posix.html" title="file_posix">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="boost__beast__file/write.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__file_posix.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="beast.ref.boost__beast__file_mode"></a><a class="link" href="boost__beast__file_mode.html" title="file_mode">file_mode</a>
28 </h4></div></div></div>
29 <p>
30         <a class="indexterm" name="idm45873510709264"></a>
31 File open modes.
32       </p>
33 <h5>
34 <a name="beast.ref.boost__beast__file_mode.h0"></a>
35         <span class="phrase"><a name="beast.ref.boost__beast__file_mode.synopsis"></a></span><a class="link" href="boost__beast__file_mode.html#beast.ref.boost__beast__file_mode.synopsis">Synopsis</a>
36       </h5>
37 <p>
38         Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/core/file_base.hpp" target="_top">boost/beast/core/file_base.hpp</a>&gt;</code>
39       </p>
40 <pre class="programlisting"><span class="keyword">enum</span> <span class="identifier">file_mode</span>
41 </pre>
42 <p>
43         <a class="indexterm" name="idm45873510701264"></a>
44  <a class="indexterm" name="idm45873510700160"></a>
45  <a class="indexterm" name="idm45873510699056"></a>
46  <a class="indexterm" name="idm45873510697952"></a>
47  <a class="indexterm" name="idm45873510696848"></a>
48  <a class="indexterm" name="idm45873510695744"></a>
49  <a class="indexterm" name="idm45873510694640"></a>
50
51       </p>
52 <h5>
53 <a name="beast.ref.boost__beast__file_mode.h1"></a>
54         <span class="phrase"><a name="beast.ref.boost__beast__file_mode.values"></a></span><a class="link" href="boost__beast__file_mode.html#beast.ref.boost__beast__file_mode.values">Values</a>
55       </h5>
56 <div class="informaltable"><table class="table">
57 <colgroup>
58 <col>
59 <col>
60 </colgroup>
61 <thead><tr>
62 <th>
63                 <p>
64                   Name
65                 </p>
66               </th>
67 <th>
68                 <p>
69                   Description
70                 </p>
71               </th>
72 </tr></thead>
73 <tbody>
74 <tr>
75 <td>
76                 <p>
77                   <code class="literal">read</code>
78                 </p>
79               </td>
80 <td>
81                 <p>
82                   Random read-only access to an existing file.
83                 </p>
84               </td>
85 </tr>
86 <tr>
87 <td>
88                 <p>
89                   <code class="literal">scan</code>
90                 </p>
91               </td>
92 <td>
93                 <p>
94                   Sequential read-only access to an existing file.
95                 </p>
96               </td>
97 </tr>
98 <tr>
99 <td>
100                 <p>
101                   <code class="literal">write</code>
102                 </p>
103               </td>
104 <td>
105                 <p>
106                   Random reading and writing to a new or truncated file.
107                 </p>
108                 <p>
109                   This mode permits random-access reading and writing for the specified
110                   file. If the file does not exist prior to the function call, it
111                   is created with an initial size of zero bytes. Otherwise if the
112                   file already exists, the size is truncated to zero bytes.
113                 </p>
114               </td>
115 </tr>
116 <tr>
117 <td>
118                 <p>
119                   <code class="literal">write_new</code>
120                 </p>
121               </td>
122 <td>
123                 <p>
124                   Random reading and writing to a new file only.
125                 </p>
126                 <p>
127                   This mode permits random-access reading and writing for the specified
128                   file. The file will be created with an initial size of zero bytes.
129                   If the file already exists prior to the function call, an error
130                   is returned and no file is opened.
131                 </p>
132               </td>
133 </tr>
134 <tr>
135 <td>
136                 <p>
137                   <code class="literal">write_existing</code>
138                 </p>
139               </td>
140 <td>
141                 <p>
142                   Random write-only access to existing file.
143                 </p>
144                 <p>
145                   If the file does not exist, an error is generated.
146                 </p>
147               </td>
148 </tr>
149 <tr>
150 <td>
151                 <p>
152                   <code class="literal">append</code>
153                 </p>
154               </td>
155 <td>
156                 <p>
157                   Appending to a new or truncated file.
158                 </p>
159                 <p>
160                   The current file position shall be set to the end of the file prior
161                   to each write.
162                 </p>
163                 <p>
164                   @li If the file does not exist, it is created.
165                 </p>
166                 <p>
167                   @li If the file exists, it is truncated to zero size upon opening.
168                 </p>
169               </td>
170 </tr>
171 <tr>
172 <td>
173                 <p>
174                   <code class="literal">append_existing</code>
175                 </p>
176               </td>
177 <td>
178                 <p>
179                   Appending to an existing file.
180                 </p>
181                 <p>
182                   The current file position shall be set to the end of the file prior
183                   to each write.
184                 </p>
185                 <p>
186                   If the file does not exist, an error is generated.
187                 </p>
188               </td>
189 </tr>
190 </tbody>
191 </table></div>
192 <h5>
193 <a name="beast.ref.boost__beast__file_mode.h2"></a>
194         <span class="phrase"><a name="beast.ref.boost__beast__file_mode.description"></a></span><a class="link" href="boost__beast__file_mode.html#beast.ref.boost__beast__file_mode.description">Description</a>
195       </h5>
196 <p>
197         These modes are used when opening files using instances of the <span class="emphasis"><em>File</em></span>
198         concept.
199       </p>
200 <h5>
201 <a name="beast.ref.boost__beast__file_mode.h3"></a>
202         <span class="phrase"><a name="beast.ref.boost__beast__file_mode.see_also"></a></span><a class="link" href="boost__beast__file_mode.html#beast.ref.boost__beast__file_mode.see_also">See
203         Also</a>
204       </h5>
205 <p>
206         <a class="link" href="boost__beast__file_stdio.html" title="file_stdio"><code class="computeroutput"><span class="identifier">file_stdio</span></code></a>
207       </p>
208 <p>
209         Convenience header <code class="literal">&lt;<a href="../../../../../../boost/beast/core.hpp" target="_top">boost/beast/core.hpp</a>&gt;</code>
210       </p>
211 </div>
212 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
213 <td align="left"></td>
214 <td align="right"><div class="copyright-footer">Copyright &#169; 2016-2019 Vinnie
215       Falco<p>
216         Distributed under the Boost Software License, Version 1.0. (See accompanying
217         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
218       </p>
219 </div></td>
220 </tr></table>
221 <hr>
222 <div class="spirit-nav">
223 <a accesskey="p" href="boost__beast__file/write.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__file_posix.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
224 </div>
225 </body>
226 </html>