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

Function _CopyStatAttributes

Engine/source/platformWin32/winVolume.cpp:129–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

getAttributesMethod · 0.85
readMethod · 0.85

Calls 1

Win32FileTimeToTimeFunction · 0.85

Tested by

no test coverage detected