# std::experimental::filesystem::path::make_preferred

> C++ Atlas: `cppatlas.com/w/cpp/experimental/fs/path/make_preferred` | Source: https://en.cppreference.com/w/cpp/experimental/fs/path/make_preferred | Domain: Technical specifications

Converts all directory separators in path to the preferred directory separator.

## Official Specification Summary (cppreference)

```cpp
path& make_preferred() // (1) (filesystem TS)
```

Converts all directory separators in path to the preferred directory separator.

For example, on systems, where `\` is the preferred separator, the path `foo/bar` will be converted to `foo\bar`.

### Parameters

(none)

### Return value

`*this`

### Exceptions

May throw implementation-defined exceptions.

### See also

> Note: This section is incomplete

---
Attribution: content from https://en.cppreference.com/w/cpp/experimental/fs/path/make_preferred (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.