| 2258 | } |
| 2259 | |
| 2260 | void IGFD::FileManager::m_CompleteFileInfos(const std::shared_ptr<FileInfos>& vInfos) { |
| 2261 | if (!vInfos.use_count()) return; |
| 2262 | |
| 2263 | if ((vInfos->fileNameExt == ".") || // current dir (special case, not really a dir or a file) |
| 2264 | (vInfos->fileNameExt == "..")) { // last dir (special case, not really a dir or a file) |
| 2265 | return; |
| 2266 | } |
| 2267 | |
| 2268 | // _stat struct : |
| 2269 | // dev_t st_dev; /* ID of device containing file */ |
| 2270 | // ino_t st_ino; /* inode number */ |
| 2271 | // mode_t st_mode; /* protection */ |
| 2272 | // nlink_t st_nlink; /* number of hard links */ |
| 2273 | // uid_t st_uid; /* user ID of owner */ |
| 2274 | // gid_t st_gid; /* group ID of owner */ |
| 2275 | // dev_t st_rdev; /* device ID (if special file) */ |
| 2276 | // off_t st_size; /* total size, in bytes */ |
| 2277 | // blksize_t st_blksize; /* blocksize for file system I/O */ |
| 2278 | // blkcnt_t st_blocks; /* number of 512B blocks allocated */ |
| 2279 | // time_t st_atime; /* time of last access - not sure out of ntfs */ |
| 2280 | // time_t st_mtime; /* time of last modification - not sure out of ntfs */ |
| 2281 | // time_t st_ctime; /* time of last status change - not sure out of ntfs */ |
| 2282 | |
| 2283 | std::string fpn; |
| 2284 | |
| 2285 | // FIXME: so the condition is always true? |
| 2286 | if (vInfos->fileType.isFile() || vInfos->fileType.isLinkToUnknown() || vInfos->fileType.isDir()) { |
| 2287 | fpn = vInfos->filePath + IGFD::Utils::GetPathSeparator() + vInfos->fileNameExt; |
| 2288 | } |
| 2289 | |
| 2290 | m_FileSystemPtr->GetFileDateAndSize(fpn, vInfos->fileType, vInfos->fileModifDate, vInfos->fileSize); |
| 2291 | |
| 2292 | if (!vInfos->fileType.isDir()) { |
| 2293 | vInfos->formatedFileSize = IGFD::Utils::FormatFileSize(vInfos->fileSize); |
| 2294 | } |
| 2295 | } |
| 2296 | |
| 2297 | void IGFD::FileManager::m_RemoveFileNameInSelection(const std::string& vFileName) { |
| 2298 | m_SelectedFileNames.erase(vFileName); |
nothing calls this directly
no test coverage detected