I am trying to get a file created / last modified and reached the last entry date, below is my sample program -
Method Signature - 'I am unable to see the date printed on the screen. Can anyone tell a mistake thanks Are there full paths in the file list? You should verify that the QFileInfo object is valid. Or is your problem with unreadable output? If this is an application with a window, then I suggest using qDebug () for debug output instead of cout. removeFiles (QDir & curDir, QStringList and fileList)
The name of the QString file; QStringList :: This Iterator; QDateTime fileCreationDate; `For (this = fileList.begin (); it! = FileList.end (); ++ it) {QFile currentFile ((* it)); QFileInfo currentFileInfo ((* this)); FileName = currentFile.fileName (); Std :: cout & lt; & Lt; "" & Lt; & Lt; FileName.toStdString () & lt; & Lt; "Date created:" & lt; & Lt; CurrentFileInfo.created (). ToString () ToStdString () & lt; & Lt; Std :: endl; }
Comments
Post a Comment