MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / _CopyStatAttributes

Function _CopyStatAttributes

Engine/source/platformWin32/winVolume.cpp:126–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124//-----------------------------------------------------------------------------
125
126static void _CopyStatAttributes(const WIN32_FIND_DATAW& info, FileNode::Attributes* attr)
127{
128 // Fill in the return struct.
129 attr->flags = 0;
130 if (S_ISDIR(info.dwFileAttributes))
131 attr->flags |= FileNode::Directory;
132 if (S_ISREG(info.dwFileAttributes))
133 attr->flags |= FileNode::File;
134
135 if (info.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
136 attr->flags |= FileNode::ReadOnly;
137
138 attr->size = info.nFileSizeLow;
139 attr->mtime = Win32FileTimeToTime(
140 info.ftLastWriteTime.dwLowDateTime,
141 info.ftLastWriteTime.dwHighDateTime);
142
143 attr->atime = Win32FileTimeToTime(
144 info.ftLastAccessTime.dwLowDateTime,
145 info.ftLastAccessTime.dwHighDateTime);
146}
147
148
149//-----------------------------------------------------------------------------

Callers 2

getAttributesMethod · 0.85
readMethod · 0.85

Calls 1

Win32FileTimeToTimeFunction · 0.85

Tested by

no test coverage detected