equivalent Function

Specifies whether two file names reference the same file.

template<class Path1, class Path2>
inline bool equivalent(
   const Path1& Pval1,
   const Path2& Pval2
);

Parameters

  • Pval1
    A Path object. Path can be either a basic_path or a type that is derived from basic_path.

  • Pval2
    A Path object.

Return Value

true if the stored file names of both Path objects reference the same file; false if the file names do not match.

Remarks

If neither Pval1 nor Pval2 reference an existing regular file, directory, or symbolic link, the function throws a basic_filesystem_error.

Requirements

Header: filesystem

Namespace: std::tr2::sys

See Also

Reference

<filesystem>

Other Resources

C++ Standard Library Header Files