demifred
4th October 2006, 10:52
Hello!
I'm unsing QT Jambi to test read permissions on files and directory from a Java application :
if (fileToRead.isDirectory()) {
QDir qDir = new QDir(fileToRead.getAbsolutePath());
System.out.println("Directory " + qDir.isReadable() + "--> " + fileToRead.getAbsolutePath());
} else {
QFileInfo qFileInfo = new QFileInfo(fileToRead.getAbsolutePath());
System.out.println("File --> " + qFileInfo.isReadable() + "--> " + fileToRead.getAbsolutePath());
}
The isReadable() method return allways true, even if the file or the directory is read protected ...
Can anybody help me ...?
Thanks! ;)
Fred
I'm unsing QT Jambi to test read permissions on files and directory from a Java application :
if (fileToRead.isDirectory()) {
QDir qDir = new QDir(fileToRead.getAbsolutePath());
System.out.println("Directory " + qDir.isReadable() + "--> " + fileToRead.getAbsolutePath());
} else {
QFileInfo qFileInfo = new QFileInfo(fileToRead.getAbsolutePath());
System.out.println("File --> " + qFileInfo.isReadable() + "--> " + fileToRead.getAbsolutePath());
}
The isReadable() method return allways true, even if the file or the directory is read protected ...
Can anybody help me ...?
Thanks! ;)
Fred