Results 1 to 3 of 3

Thread: Windows file permission : isReadable()

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Windows file permission : isReadable()

    Hello!

    I'm unsing QT Jambi to test read permissions on files and directory from a Java application :

    Qt Code:
    1. if (fileToRead.isDirectory()) {
    2. QDir qDir = new QDir(fileToRead.getAbsolutePath());
    3. System.out.println("Directory " + qDir.isReadable() + "--> " + fileToRead.getAbsolutePath());
    4. } else {
    5. QFileInfo qFileInfo = new QFileInfo(fileToRead.getAbsolutePath());
    6. System.out.println("File --> " + qFileInfo.isReadable() + "--> " + fileToRead.getAbsolutePath());
    7. }
    To copy to clipboard, switch view to plain text mode 

    The isReadable() method return allways true, even if the file or the directory is read protected ...

    Can anybody help me ...?

    Thanks!

    Fred
    Last edited by wysota; 4th October 2006 at 11:02. Reason: missing [code] tags

Similar Threads

  1. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 11:47
  2. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 01:00
  3. File permission QFile::WriteOther on Win Dos
    By patrik08 in forum Newbie
    Replies: 1
    Last Post: 13th June 2006, 14:16
  4. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.