# operator==(std::filesystem::file_status)

> C++ Atlas: `cppatlas.com/w/cpp/filesystem/file_status/operator==` | Source: https://en.cppreference.com/w/cpp/filesystem/file_status/operator== | Domain: Filesystem | Standards: C++20

Checks if two file_status values are equal, i.e. types and permissions represented by them are same respectively.

## Official Specification Summary (cppreference)

```cpp
friend bool operator==( const file_status& lhs, const file_status& rhs ) noexcept; // (since C++20)
```

Checks if two `file_status` values are equal, i.e. types and permissions represented by them are same respectively.

This function is not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::filesystem::file_status is an associated class of the arguments.

The `!=` operator is synthesized from `operator==`.

### Parameters

- `lhs, rhs` - `file_status` values to compare

### Return value

`lhs.type() == rhs.type() && lhs.permissions() == rhs.permissions()`

### See also

- [`type`](https://en.cppreference.com/w/cpp/filesystem/file_status/type): gets or sets the type of the file (public member function)
- [`permissions`](https://en.cppreference.com/w/cpp/filesystem/file_status/permissions): gets or sets the permissions of the file (public member function)

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