MCPcopy Create free account
hub / github.com/apache/arrow / ToTimePoint

Function ToTimePoint

cpp/src/arrow/filesystem/localfs.cc:77–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77TimePoint ToTimePoint(FILETIME ft) {
78 // Hundreds of nanoseconds between January 1, 1601 (UTC) and the Unix epoch.
79 static constexpr int64_t kFileTimeEpoch = 11644473600LL * 10000000;
80
81 int64_t hundreds = (static_cast<int64_t>(ft.dwHighDateTime) << 32) + ft.dwLowDateTime -
82 kFileTimeEpoch; // hundreds of ns since Unix epoch
83 std::chrono::nanoseconds ns_count(100 * hundreds);
84 return TimePoint(std::chrono::duration_cast<TimePoint::duration>(ns_count));
85}
86
87FileInfo FileInformationToFileInfo(const BY_HANDLE_FILE_INFORMATION& information) {
88 FileInfo info;

Callers 3

StatToFileInfoFunction · 0.85
PathInfoToFileInfoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected