# std::filesystem::path::clear

> C++ Atlas: `cppatlas.com/w/cpp/filesystem/path/clear` | Source: https://en.cppreference.com/w/cpp/filesystem/path/clear | Domain: Filesystem | Standards: C++17

Clears the stored pathname. empty() is true after the call.

## Official Specification Summary (cppreference)

```cpp
void clear() noexcept; // (since C++17)
```

Clears the stored pathname. `empty()` is `true` after the call.

### Parameters

(none)

### Return value

(none)

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