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

Function remove_nt6_impl

src/operations.cpp:2020–2046  ·  view source on GitHub ↗

remove() implementation for Windows Vista and newer

Source from the content-addressed store, hash-verified

2018
2019//! remove() implementation for Windows Vista and newer
2020inline bool remove_nt6_impl(path const& p, remove_impl_type impl, error_code* ec)
2021{
2022 unique_handle h(create_file_handle(
2023 p,
2024 DELETE | FILE_READ_ATTRIBUTES | FILE_READ_EA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA,
2025 FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
2026 nullptr,
2027 OPEN_EXISTING,
2028 FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT));
2029 DWORD err = 0u;
2030 if (BOOST_UNLIKELY(!h))
2031 {
2032 err = ::GetLastError();
2033
2034 return_error:
2035 if (!not_found_error(err))
2036 emit_error(err, p, ec, "boost::filesystem::remove");
2037
2038 return false;
2039 }
2040
2041 err = fs::detail::remove_nt6_by_handle(h.get(), impl);
2042 if (BOOST_UNLIKELY(err != 0u))
2043 goto return_error;
2044
2045 return true;
2046}
2047
2048//! remove() implementation
2049inline bool remove_impl(path const& p, error_code* ec)

Callers 1

remove_implFunction · 0.85

Calls 5

create_file_handleFunction · 0.85
not_found_errorFunction · 0.85
emit_errorFunction · 0.85
remove_nt6_by_handleFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected