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
|
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>
<body>
$id frontmatter=
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td width="277">
<a href="../../../index.htm">
<img src="../../../boost.png" alt="boost.png (6897 bytes)" align="middle" width="300" height="86" border="0"></a></td>
<td align="middle">
<font size="7">Filesystem Library<br>
</font>
<font size="6">Version 3</font></td>
</tr>
</table>
<table border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" bgcolor="#D7EEFF" width="100%">
<tr>
<td><a href="index.htm">Filesystem Home</a>
<a href="release_history.html">Releases</a>
<a href="reference.html">Reference</a>
<a href="tutorial.html">Tutorial</a>
<a href="faq.htm">FAQ</a>
<a href="portability_guide.htm">Portability</a>
<a href="v3.html">V3 Intro</a>
<a href="v3_design.html">V3 Design</a>
<a href="deprecated.html">Deprecated</a>
</td>
</td>
</tr>
</table>
<h1>Reference Documentation</h1>
$endid
$id wording_prefix=
<h2><a name="Introduction">Introduction</a></h2>
<p>This reference documentation describes components that C++ programs may use
to perform operations involving file systems, including paths, regular files,
and directories.</p>
<blockquote>
<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" bgcolor="#D7EEFF" width="90%">
<tr>
<td width="100%" align="center" colspan="2">
<p align="center"><b>C++11 Support</b><p align="left">This reference
documentation is written as if all compilers supported C++11. Where
possible, the implementation falls back to C++03 if a C++11 feature is not
available.</td>
</tr>
<tr>
<td width="35%" align="center">
<b>C++11 Feature</b></td>
<td width="65%" align="center">
<b>Action if not supported by compiler</b></td>
</tr>
<tr>
<td width="35%" align="left">
<code>noexcept</code></td>
<td width="65%" align="left">
Keyword omitted.</td>
</tr>
<tr>
<td width="35%" align="left">
<code>constexpr</code></td>
<td width="65%" align="left">
Keyword omitted.</td>
</tr>
<tr>
<td width="35%" align="left">
<p dir="rtl">R-value references</td>
<td width="65%" align="left">
Function signature omitted.</td>
</tr>
<tr>
<td width="35%" align="left">
New character types</td>
<td width="65%" align="left">
<p dir="ltr">The <code>boost::filesystem</code> interface doesn't use the
new types directly. It does use <code>u16string</code> and <code>u32string</code>
in namespace <code>boost</code>. These are typedefs to <code>std::u16string</code>
and <code>std::u32string</code> for C++11, or to <code>
std::basic_string<boost::u16_t></code> and <code>
std::basic_string<boost::u32_t></code> for C++03.</td>
</tr>
<tr>
<td width="35%" align="left">
Defaulted and deleted functions</td>
<td width="65%" align="left">
Workaround replacement functions provided.</td>
</tr>
<tr>
<td width="35%" align="left">
Initializer lists</td>
<td width="65%" align="left">
Not currently used.</td>
</tr>
<tr>
<td width="35%" align="left">
Variadic templates</td>
<td width="65%" align="left">
Not currently used.</td>
</tr>
<tr>
<td width="35%" align="left">
Range-based for statements</td>
<td width="65%" align="left">
Supporting functions always provided; they do no harm even for C++03
compilers.</td>
</tr>
</table>
</blockquote>
$endid
$id wording_suffix=
<h3><a name="File-streams">File streams</a> -
<a href="../../../boost/filesystem/fstream.hpp"><boost/filesystem/fstream.hpp></a></h3>
<p>Replacements are provided for the file stream classes from the C++ standard
library's <code><fstream></code> header. These replacement classes
publicly inherit from the standard library classes. In the Boost.Filesystem
version, constructors and open functions take <code>const path&</code> arguments
instead of <code>
const char*</code> arguments. There are no other differences in syntax or
semantics.</p>
<pre>$NAMESPACE_BEGIN;
template < class charT, class traits = std::char_traits<charT> >
class basic_filebuf : public std::basic_filebuf<charT,traits>
{
public:
basic_filebuf<charT,traits>*
open(const path& p, std::ios_base::openmode mode);
};
template < class charT, class traits = std::char_traits<charT> >
class basic_ifstream : public std::basic_ifstream<charT,traits>
{
public:
explicit basic_ifstream(const path& p, std::ios_base::openmode mode=std::ios_base::in)
void open(const path& p, std::ios_base::openmode mode=std::ios_base::in);
};
template < class charT, class traits = std::char_traits<charT> >
class basic_ofstream : public std::basic_ofstream<charT,traits>
{
public:
explicit basic_ofstream(const path& p, std::ios_base::openmode mode=std::ios_base::out);
void open(const path& p, std::ios_base::openmode mode=std::ios_base::out);
};
template < class charT, class traits = std::char_traits<charT> >
class basic_fstream : public std::basic_fstream<charT,traits>
{
public:
explicit basic_fstream(const path& p,
std::ios_base::openmode mode=std::ios_base::in | std::ios_base::out);
void open(const path& p,
std::ios_base::openmode mode=std::ios_base::in | std::ios_base::out);
};
typedef basic_filebuf<char> filebuf;
typedef basic_ifstream<char> ifstream;
typedef basic_ofstream<char> ofstream;
typedef basic_fstream<char> fstream;
typedef basic_filebuf<wchar_t> wfilebuf;
typedef basic_ifstream<wchar_t> wifstream;
typedef basic_fstream<wchar_t> wfstream;
typedef basic_ofstream<wchar_t> wofstream;
$NAMESPACE_END;</pre>
$endid
$id backmatter=>
<p><font size="2">© Copyright Beman Dawes, 2002, 2006, 2007, 2009, 2010, 2011</font></p>
<p><font size="2">Distributed under the Boost Software License, Version 1.0. See
</font>
<a href="http://www.boost.org/LICENSE_1_0.txt"><font size="2">www.boost.org/LICENSE_1_0.txt</font></a></p>
<p><font size="2">Revised
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B %Y" startspan -->16 July 2012<!--webbot bot="Timestamp" endspan i-checksum="18787" --></font></p>
$endid
</body>
</html>
|