31 Input/output library [input.output]

31.12 File systems [filesystems]

31.12.7 Class filesystem_error [fs.class.filesystem.error]

31.12.7.1 General [fs.class.filesystem.error.general]

namespace std::filesystem { class filesystem_error : public system_error { public: filesystem_error(const string& what_arg, error_code ec); filesystem_error(const string& what_arg, const path& p1, error_code ec); filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec); const path& path1() const noexcept; const path& path2() const noexcept; const char* what() const noexcept override; }; }
The class filesystem_error defines the type of objects thrown as exceptions to report file system errors from functions described in subclause [filesystems].