MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / FileTime

Method FileTime

FastCopy/FileTime.cpp:6–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include <stdexcept>
5
6FileTime::FileTime(HANDLE fileHandle)
7{
8 if (!GetFileTime(fileHandle, &createTime, &lastAccessTime, &lastWriteTime))
9 throw std::runtime_error{"Failed to GetFileTime"};
10}
11
12FileTime::FileTime(std::wstring_view path) : FileTime{ HandleWrapper{CreateFile(path.data(), GENERIC_READ, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL)}.Get()}
13{

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected