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

Function resize_file_impl

src/operations.cpp:2277–2283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2275}
2276
2277inline BOOL resize_file_impl(const wchar_t* p, uintmax_t size)
2278{
2279 unique_handle h(CreateFileW(p, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr));
2280 LARGE_INTEGER sz;
2281 sz.QuadPart = size;
2282 return !!h && ::SetFilePointerEx(h.get(), sz, 0, FILE_BEGIN) && ::SetEndOfFile(h.get());
2283}
2284
2285//! Converts NT path to a Win32 path
2286inline path convert_nt_path_to_win32_path(const wchar_t* nt_path, std::size_t size)

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected