Reputation: 71
I have a network folder, mountet in /mnt/test. Now I would like to know, if the folder is available. I tried to check, if the folder 'tmp' exists.
This doesnt work for me. To check, if the folder is online, the function is called every 1-2 second.
if(QFileInfo(path + "tmp/").exists())
test = dir.entryList();
else
// device is not available
But every time, the programm tries to read the entryList().
Upvotes: 0
Views: 526
Reputation: 22376
Although there's nothing technically wrong with what you're doing, the method was never designed to be used in a polling scenario - QFileSystemWatcher
is though.
Upvotes: 3