tmp/tmpvwo2th23/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### File size <a id="fs.op.file_size">[[fs.op.file_size]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
uintmax_t file_size(const path& p);
|
| 5 |
+
uintmax_t file_size(const path& p, error_code& ec) noexcept;
|
| 6 |
+
```
|
| 7 |
+
|
| 8 |
+
*Returns:*
|
| 9 |
+
|
| 10 |
+
- If `!exists(p)` an error is reported ([[fs.err.report]]).
|
| 11 |
+
- Otherwise, if `is_regular_file(p)`, the size in bytes of the file `p`
|
| 12 |
+
resolves to, determined as if by the value of the POSIX `stat`
|
| 13 |
+
structure member `st_size` obtained as if by POSIX `stat()`.
|
| 14 |
+
- Otherwise, the result is *implementation-defined*.
|
| 15 |
+
|
| 16 |
+
The signature with argument `ec` returns `static_cast<uintmax_t>(-1)` if
|
| 17 |
+
an error occurs.
|
| 18 |
+
|
| 19 |
+
*Throws:* As specified in [[fs.err.report]].
|
| 20 |
+
|