Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Android and Tizen compatability in Qt5
Gourmet last edited by
Tizen is different OS to Android but can run Android apps. I develop and test my apps in Android only cause do not have Samsung phone with Tizen. In my app I need use QFile::exists() method to check for some folder. The file name for QFile constructor does not have option for case insensitive exists() check. Android uses YAFFS2 as file system for internal storage and FAT(32) or exFAT for external. All three file system types are case insensitive. I confirm this - my app when checks for QFile( "/mnt/music" ) folder gets true from exists(). But the actual folder name is Music.
But... Tizen type of file system is not known (at least widely...). Probably this is EXT4 or something. The only one thing I have found - it IS case sensitive. That means - the code with QFile::exists() function can not work on Tizen smartphone properly. If only Qt operations with file names could be turned to be case insensitive - it could be some way around. But now I am frustrated...
Is here anybody having Tizen driving device and able to make Qt5 app and run on it? Can you check if QFile::exists() function is case sensitive or not?
you can do it via QDir:
QDir d("folderPath"); auto entries = d.entryList(QDir::Files); return entries.contains(fileName, Qt::CaseSensitive);
Gourmet last edited by Gourmet
@j-hilk this is not best solution for me. I need check for existing folders with different pathnames dynamically assembled. In your case I must for each folder parse it's pathname, get path, create QDir with this path, then do what you suggest. Instead of just write:
if( QFile::exists( fullpath() ) ) ......
Better solution should be:
if( QFile::exists( fullpath(), Qt::CaseInsensitive ) ) ......