tmp/tmpv9atr8je/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Deprecated file systems <a id="depr.filesystems">[[depr.filesystems]]</a>
|
| 2 |
+
|
| 3 |
+
### Deprecated filesystem path factory functions <a id="depr.fs.path.factory">[[depr.fs.path.factory]]</a>
|
| 4 |
+
|
| 5 |
+
The header `<filesystem>` has the following additions:
|
| 6 |
+
|
| 7 |
+
``` cpp
|
| 8 |
+
template<class Source>
|
| 9 |
+
path u8path(const Source& source);
|
| 10 |
+
template<class InputIterator>
|
| 11 |
+
path u8path(InputIterator first, InputIterator last);
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
*Mandates:* The value type of `Source` and `InputIterator` is `char` or
|
| 15 |
+
`char8_t`.
|
| 16 |
+
|
| 17 |
+
*Preconditions:* The `source` and \[`first`, `last`) sequences are UTF-8
|
| 18 |
+
encoded. `Source` meets the requirements specified in [[fs.path.req]].
|
| 19 |
+
|
| 20 |
+
*Returns:*
|
| 21 |
+
|
| 22 |
+
- If `path::value_type` is `char` and the current native narrow
|
| 23 |
+
encoding [[fs.path.type.cvt]] is UTF-8, return `path(source)` or
|
| 24 |
+
`path(first, last)`; otherwise,
|
| 25 |
+
- if `path::value_type` is `wchar_t` and the native wide encoding is
|
| 26 |
+
UTF-16, or if `path::value_type` is `char16_t` or `char32_t`, convert
|
| 27 |
+
`source` or \[`first`, `last`) to a temporary, `tmp`, of type
|
| 28 |
+
`path::string_type` and return `path(tmp)`; otherwise,
|
| 29 |
+
- convert `source` or \[`first`, `last`) to a temporary, `tmp`, of type
|
| 30 |
+
`u32string` and return `path(tmp)`.
|
| 31 |
+
|
| 32 |
+
*Remarks:* Argument format conversion [[fs.path.fmt.cvt]] applies to the
|
| 33 |
+
arguments for these functions. How Unicode encoding conversions are
|
| 34 |
+
performed is unspecified.
|
| 35 |
+
|
| 36 |
+
[*Example 1*:
|
| 37 |
+
|
| 38 |
+
A string is to be read from a database that is encoded in UTF-8, and
|
| 39 |
+
used to create a directory using the native encoding for filenames:
|
| 40 |
+
|
| 41 |
+
``` cpp
|
| 42 |
+
namespace fs = std::filesystem;
|
| 43 |
+
std::string utf8_string = read_utf8_data();
|
| 44 |
+
fs::create_directory(fs::u8path(utf8_string));
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
For POSIX-based operating systems with the native narrow encoding set to
|
| 48 |
+
UTF-8, no encoding or type conversion occurs.
|
| 49 |
+
|
| 50 |
+
For POSIX-based operating systems with the native narrow encoding not
|
| 51 |
+
set to UTF-8, a conversion to UTF-32 occurs, followed by a conversion to
|
| 52 |
+
the current native narrow encoding. Some Unicode characters may have no
|
| 53 |
+
native character set representation.
|
| 54 |
+
|
| 55 |
+
For Windows-based operating systems a conversion from UTF-8 to UTF-16
|
| 56 |
+
occurs.
|
| 57 |
+
|
| 58 |
+
— *end example*]
|
| 59 |
+
|
| 60 |
+
[*Note 1*: The example above is representative of a historical use of
|
| 61 |
+
`filesystem::u8path`. To indicate a UTF-8 encoding, passing a
|
| 62 |
+
`std::u8string` to `path`’s constructor is preferred as it is consistent
|
| 63 |
+
with `path`’s handling of other encodings. — *end note*]
|
| 64 |
+
|
| 65 |
+
### Deprecated filesystem path format observers <a id="depr.fs.path.obs">[[depr.fs.path.obs]]</a>
|
| 66 |
+
|
| 67 |
+
The following members are declared in addition to those members
|
| 68 |
+
specified in [[fs.path.member]]:
|
| 69 |
+
|
| 70 |
+
``` cpp
|
| 71 |
+
namespace std::filesystem {
|
| 72 |
+
class path {
|
| 73 |
+
public:
|
| 74 |
+
std::string string() const;
|
| 75 |
+
std::string generic_string() const;
|
| 76 |
+
};
|
| 77 |
+
}
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
``` cpp
|
| 81 |
+
std::string string() const;
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
*Returns:* `system_encoded_string()`.
|
| 85 |
+
|
| 86 |
+
``` cpp
|
| 87 |
+
std::string generic_string() const;
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
*Returns:* `generic_system_encoded_string()`.
|
| 91 |
+
|