Welcome to mirror list, hosted at ThFree Co, Russian Federation.

class_handle.qbk « generated « doc « attic - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6a5a8e412558549f3308222a1046b460706bf66a (plain)
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
[/============================================================================
  Boost.AFIO

  Use, modification and distribution is subject to the Boost Software License,
  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]


[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml\classboost_1_1afio_1_1handle.xml]
[section:handle handle]
'''<?dbhtml-include href="disqus_identifiers/handle.html"?>'''
[section:open_states open_states]
'''<?dbhtml-include href="disqus_identifiers/open_states.html"?>'''

'''<indexterm><primary>open_states</primary></indexterm>'''
'''<indexterm><primary>closed</primary></indexterm>'''
'''<indexterm><primary>open</primary></indexterm>'''
'''<indexterm><primary>opendir</primary></indexterm>'''
In which way this handle is opened or not. 

[heading Synopsis]
``enum open_states {closed, open, opendir};``

[heading Values]

[table
[[Value] [Description] ]
[[closed] [This handle is closed. ]]
[[open] [This handle is open as a normal handle. ]]
[[opendir] [This handle is open as a cached directory handle, and therefore closing it explicitly has no effect. ]]
]


[heading Header]
`#include <boost/afio/v2/afio.hpp>`


'''<?dbhtml-include href="disqus_comments.html"?>'''
[endsect]


'''<indexterm><primary>handle</primary></indexterm>'''
The abstract base class encapsulating a platform-specific file handle. 

[heading Description]
Note that failure to explicitly schedule closing a file handle in the dispatcher means it will be synchronously closed on last reference count by handle. This can consume considerable time, especially if SyncOnClose is enabled.

[heading Synopsis]
``class handle
      : public std::enable_shared_from_this< handle >
{
  // ...
};
``

[heading Constructor(s)]
[table
[[Function] [Description] [Parameters] ]
[[``~handle()``

] [] [

]]
]

[heading Member Function(s)]
[table
[[Function] [Description] [Parameters]  [Returns]]
[[``dispatcher * parent()``

] [Returns the parent of this io handle. ] [

][

]
]
[[``handle_ptr container()``

] [Returns a handle to the directory containing this handle. Only works if [^`file_flags::hold_parent_open`] was specified when this handle was opened. ] [

][

]
]
[[``open_states is_open()``

] [Returns if this handle is opened or not. ] [

][

]
]
[[``void * native_handle()``

] [Returns the native handle of this io handle. On POSIX, you can cast this to a fd using [^`(int)(size_t) ``native_handle()`]. On Windows it's a simple [^`(HANDLE) ``native_handle()`]. ] [

][

]
]
[[``const chrono::system_clock::time_point & opened()``

] [Returns when this handle was opened. ] [

][

]
]
[[``boost::afio::path path(bool refresh = false)``

] [Returns the path of this i/o handle right now if the handle is open and ['refresh] is true, else last known good. May be null if the file has been deleted. ] [[* bool]: ['refresh]:  Whether to ask the OS for the current path of this handle.



][
The path of this i/o handle right now. 

]
]
[[``boost::afio::path path()``

] [Returns the last known good path of this i/o handle. May be null if the file has been deleted. ] [

][

]
]
[[``file_flags flags()``

] [Returns the final flags used when this handle was opened. ] [

][

]
]
[[``bool opened_as_file()``

] [True if this handle was opened as a file. ] [

][

]
]
[[``bool opened_as_dir()``

] [True if this handle was opened as a directory. ] [

][

]
]
[[``bool opened_as_symlink()``

] [True if this handle was opened as a symlink. ] [

][

]
]
[[``bool available_to_directory_cache()``

] [True if this handle is used by the directory handle cache (not UniqueDirectoryHandle and is open for write and not open for write) ] [

][

]
]
[[``off_t read_count()``

] [Returns how many bytes have been read since this handle was opened. ] [

][

]
]
[[``off_t write_count()``

] [Returns how many bytes have been written since this handle was opened. ] [

][

]
]
[[``off_t write_count_since_fsync()``

] [Returns how many bytes have been written since this handle was last fsynced. ] [

][

]
]
[[``directory_entry direntry(metadata_flags wanted = directory_entry::metadata_fastpath())``

] [Returns a mostly filled directory_entry for the file or directory referenced by this handle. Use [^`metadata_flags::All`] if you want it as complete as your platform allows, even at the cost of severe performance loss. ] [[* metadata_flags]: ['wanted]:  The metadata wanted.



][
A directory entry for this handle. 

]
]
[[``stat_t lstat(metadata_flags wanted = directory_entry::metadata_fastpath())``

] [Returns a mostly filled stat_t structure for the file or directory referenced by this handle. Use [^`metadata_flags::All`] if you want it as complete as your platform allows, even at the cost of severe performance loss. Calls direntry(), so same race guarantees as that call. ] [[* metadata_flags]: ['wanted]:  



][

]
]
[[``boost::afio::path target()``

] [Returns the target path of this handle if it is a symbolic link. ] [

][
The path the symbolic link points to. May not exist or even be valid.

]
]
[[``mapped_file_ptr map_file(size_t length = (size_t)-1, off_t offset = 0, bool read_only = false)``

] [Maps the file into memory, returning a null pointer if couldn't map (e.g. address space exhaustion). Do NOT mix this with [^`file_flags::os_direct`]! ] [[* size_t]: ['length]:  

[* off_t]: ['offset]:  

[* bool]: ['read_only]:  



][

]
]
[[``void link(const path_req & req)``

] [Hard links the file to a new location on the same volume. ] [[* const path_req &]: ['req]:  The absolute or relative (in which case precondition specifies a directory) path to create a hard link at.



][

]
]
[[``void unlink()``

] [Unlinks the file from its present location as determined by path(true), which could be any hard link on those operating systems with an unstable path(true). Other links may remain to the same file. ] [

][

]
]
[[``void atomic_relink(const path_req & req)``

] [Links the file to a new location and unlinks the file from its present location as determined by path(true), ['atomically overwriting any file entry at the new location]. Very useful for preparing file content elsewhere and once ready, atomically making it visible at some named location to other processes. Note that operating systems with an unstable path(true) may relink any hard link to the file to the new location. ] [[* const path_req &]: ['req]:  The absolute or relative (in which case precondition specifies a directory) path to relink to.



][

]
]
]

[heading Header]
`#include <boost/afio/v2/afio.hpp>`

[include generated/struct_handle_1_1mapped_file.qbk]
[include generated/group_async_io_handle__ops.qbk]

'''<?dbhtml-include href="disqus_comments.html"?>'''
[endsect]