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

Function FileInformationToFileInfo

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

Source from the content-addressed store, hash-verified

85}
86
87FileInfo FileInformationToFileInfo(const BY_HANDLE_FILE_INFORMATION& information) {
88 FileInfo info;
89 if (information.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
90 info.set_type(FileType::Directory);
91 info.set_size(kNoSize);
92 } else {
93 // Regular file
94 info.set_type(FileType::File);
95 info.set_size((static_cast<int64_t>(information.nFileSizeHigh) << 32) +
96 information.nFileSizeLow);
97 }
98 info.set_mtime(ToTimePoint(information.ftLastWriteTime));
99 return info;
100}
101
102Result<FileInfo> StatFile(const std::wstring& path) {
103 HANDLE h;

Callers 1

StatFileFunction · 0.85

Calls 1

ToTimePointFunction · 0.85

Tested by

no test coverage detected