Files
cppdraft_translate/cppdraft/fs/op/symlink/status.md
2025-10-25 03:02:53 +03:00

1.9 KiB
Raw Blame History

[fs.op.symlink.status]

31 Input/output library [input.output]

31.12 File systems [filesystems]

31.12.13 Filesystem operation functions [fs.op.funcs]

🔗

file_status filesystem::symlink_status(const path& p); file_status filesystem::symlink_status(const path& p, error_code& ec) noexcept;

1

#

Effects: Same as status, above, except that the attributes of p are determined as if by using POSIX lstat to obtain a POSIX struct stat.

2

#

Let prms denote the result of (m & perms::mask), where m is determined as if by converting the st_mode member of the obtained struct stat to the type perms.

3

#

Returns: Same as status, above, except that if the attributes indicate a symbolic link, as if by POSIX S_ISLNK, returns file_status(file_type::symlink, prms).

The signature with argument ec returns file_status(file_type::none) if an error occurs.

4

#

Throws: As specified in [fs.err.report].

5

#

Remarks: Pathname resolution terminates if p names a symbolic link.