symlink_status Function

Retrieves the symbolic link status of a specified file.

template<class Path>
inline file_status symlink_status(
   const Path& Pval
);
template<class Path>
inline file_status symlink_status(
   const Path& Pval,
   error_code& Code
);

Parameters

  • Pval
    A Path object. Path can be either a basic_path or a type that's derived from basic_path.

  • Code
    An error_code object.

Return Value

A file_status object that indicates the symbolic-link status of the specified file.

Remarks

If the stored symbolic-link status is not status_unknown, then the stored symbolic link-status is returned. Otherwise, the function determines the status from the operating system.

The second function assigns any error code that's associated with the operation to Code.

Requirements

Header: filesystem

Namespace: std::tr2::sys

See Also

Reference

<filesystem>

Other Resources

C++ Standard Library Header Files