Get information common to all file types.
| 39 | |
| 40 | /// Get information common to all file types. |
| 41 | static FileStats getCommonFileInfo(const std::string& path) |
| 42 | { |
| 43 | FileStats result; |
| 44 | const Base::FileInfo file(path); |
| 45 | result.insert( |
| 46 | std::make_pair(DisplayedFilesModelRoles::modifiedTime, getLastModifiedAsString(file)) |
| 47 | ); |
| 48 | result.insert(std::make_pair(DisplayedFilesModelRoles::path, path)); |
| 49 | result.insert(std::make_pair(DisplayedFilesModelRoles::size, humanReadableSize(file.size()))); |
| 50 | result.insert(std::make_pair(DisplayedFilesModelRoles::baseName, file.fileName())); |
| 51 | return result; |
| 52 | } |
| 53 | |
| 54 | static bool freecadCanOpen(const QString& extension) |
| 55 | { |