MCPcopy Create free account
hub / github.com/IENT/YUView / getFileInfoList

Method getFileInfoList

YUViewLib/src/filesource/FileSource.cpp:119–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119QList<InfoItem> FileSource::getFileInfoList() const
120{
121 QList<InfoItem> infoList;
122
123 if (!this->isFileOpened)
124 return infoList;
125
126 infoList.append(InfoItem("File Path", this->fileInfo.absoluteFilePath()));
127#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
128 auto createdtime = this->fileInfo.created().toString("yyyy-MM-dd hh:mm:ss");
129#else
130 auto createdtime = this->fileInfo.birthTime().toString("yyyy-MM-dd hh:mm:ss");
131#endif
132 infoList.append(InfoItem("Time Created", createdtime));
133 infoList.append(
134 InfoItem("Time Modified", this->fileInfo.lastModified().toString("yyyy-MM-dd hh:mm:ss")));
135 infoList.append(InfoItem("Nr Bytes", QString("%1").arg(this->fileInfo.size())));
136
137 return infoList;
138}
139
140QString FileSource::getAbsoluteFilePath() const
141{

Callers 2

getInfoMethod · 0.80
getInfoMethod · 0.80

Calls 5

InfoItemClass · 0.85
appendMethod · 0.80
toStringMethod · 0.80
createdMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected