MCPcopy Create free account
hub / github.com/boostorg/filesystem / status_impl

Function status_impl

src/operations.cpp:1797–1821  ·  view source on GitHub ↗

status() implementation

Source from the content-addressed store, hash-verified

1795
1796//! status() implementation
1797fs::file_status status_impl(path const& p, error_code* ec)
1798{
1799 // We should first test if the file is a symlink or a reparse point. Resolving some reparse
1800 // points by opening the file may fail, and status() should return file_status(reparse_file) in this case.
1801 // Which is what symlink_status() returns.
1802 fs::file_status st(detail::symlink_status_impl(p, ec));
1803 if (st.type() == symlink_file)
1804 {
1805 // Resolve the symlink
1806 unique_handle h(create_file_handle(
1807 p.c_str(),
1808 FILE_READ_ATTRIBUTES | FILE_READ_EA, // see the comment in symlink_status_impl re. access mode
1809 FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
1810 nullptr, // lpSecurityAttributes
1811 OPEN_EXISTING,
1812 FILE_FLAG_BACKUP_SEMANTICS));
1813
1814 if (!h)
1815 return process_status_failure(p, ec);
1816
1817 st = detail::status_by_handle(h.get(), p, ec);
1818 }
1819
1820 return st;
1821}
1822
1823namespace {
1824

Callers 10

canonical_commonFunction · 0.85
copyFunction · 0.85
create_directoriesFunction · 0.85
permissionsFunction · 0.85
space_info spaceFunction · 0.85
file_status statusFunction · 0.85
temp_directory_pathFunction · 0.85
weakly_canonical_v3Function · 0.85
weakly_canonical_v4Function · 0.85
push_directoryMethod · 0.85

Calls 7

symlink_status_implFunction · 0.85
create_file_handleFunction · 0.85
process_status_failureFunction · 0.85
status_by_handleFunction · 0.85
typeMethod · 0.80
getMethod · 0.80
c_strMethod · 0.45

Tested by

no test coverage detected