| 2320 | } |
| 2321 | |
| 2322 | void IGFD::FileManager::m_CompleteFileInfos(const std::shared_ptr<FileInfos>& vInfos) { |
| 2323 | if (!vInfos.use_count()) return; |
| 2324 | |
| 2325 | if ((vInfos->fileNameExt == ".") || // current dir (special case, not really a dir or a file) |
| 2326 | (vInfos->fileNameExt == "..")) { // last dir (special case, not really a dir or a file) |
| 2327 | return; |
| 2328 | } |
| 2329 | |
| 2330 | // _stat struct : |
| 2331 | // dev_t st_dev; /* ID of device containing file */ |
| 2332 | // ino_t st_ino; /* inode number */ |
| 2333 | // mode_t st_mode; /* protection */ |
| 2334 | // nlink_t st_nlink; /* number of hard links */ |
| 2335 | // uid_t st_uid; /* user ID of owner */ |
| 2336 | // gid_t st_gid; /* group ID of owner */ |
| 2337 | // dev_t st_rdev; /* device ID (if special file) */ |
| 2338 | // off_t st_size; /* total size, in bytes */ |
| 2339 | // blksize_t st_blksize; /* blocksize for file system I/O */ |
| 2340 | // blkcnt_t st_blocks; /* number of 512B blocks allocated */ |
| 2341 | // time_t st_atime; /* time of last access - not sure out of ntfs */ |
| 2342 | // time_t st_mtime; /* time of last modification - not sure out of ntfs */ |
| 2343 | // time_t st_ctime; /* time of last status change - not sure out of ntfs */ |
| 2344 | |
| 2345 | std::string fpn; |
| 2346 | |
| 2347 | // FIXME: so the condition is always true? |
| 2348 | if (vInfos->fileType.isFile() || vInfos->fileType.isLinkToUnknown() || vInfos->fileType.isDir()) { |
| 2349 | fpn = vInfos->filePath + IGFD::Utils::GetPathSeparator() + vInfos->fileNameExt; |
| 2350 | } |
| 2351 | |
| 2352 | m_FileSystemPtr->GetFileDateAndSize(fpn, vInfos->fileType, vInfos->fileModifDate, vInfos->fileSize); |
| 2353 | |
| 2354 | if (!vInfos->fileType.isDir()) { |
| 2355 | vInfos->formatedFileSize = IGFD::Utils::FormatFileSize(vInfos->fileSize); |
| 2356 | } |
| 2357 | } |
| 2358 | |
| 2359 | void IGFD::FileManager::m_RemoveFileNameInSelection(const std::string& vFileName) { |
| 2360 | m_SelectedFileNames.erase(vFileName); |
nothing calls this directly
no test coverage detected