| 127 | //----------------------------------------------------------------------------- |
| 128 | |
| 129 | static 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 | //----------------------------------------------------------------------------- |
no test coverage detected