# std::experimental::filesystem::directory_entry::replace_filename

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

Changes the filename of the directory entry.

## Official Specification Summary (cppreference)

```cpp
void replace_filename( const path& p ); // (filesystem TS)
```

Changes the filename of the directory entry.

Effectively sets path to `path().parent_path() / p`.

This function does not commit any changes to the filesystem.

### Parameters

- `p` - the path to append to the parent path of the currently stored path

### Return value

(none)

### Exceptions

> Note: This section is incomplete

### See also

> Note: This section is incomplete

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