Results 1 to 3 of 3

Thread: Detect locked files

  1. #1
    Join Date
    Nov 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Detect locked files

    Hello

    I have a file(open by another 3rd party app on windows) which i would like to test for locked status. i.e. want to see if its being used.

    Is there a QT command which can do this?

    I was thinking of doing a rename to the file and see if it fails. Seems a bit messy and disruptive.

    Cheers

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Detect locked files

    I'd just try to open it for writing - it aught to fail right there. As long as you open it in append mode you do not affect the contents of the file.

  3. #3
    Join Date
    Nov 2006
    Posts
    28
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Detect locked files

    that worked, cheers.

Similar Threads

  1. Problem converting .ui files from Qt3 to 4
    By Amanda in forum Qt Programming
    Replies: 6
    Last Post: 28th October 2006, 04:34
  2. Replies: 5
    Last Post: 22nd September 2006, 08:04
  3. UTF-16 files
    By jcr in forum Qt Programming
    Replies: 3
    Last Post: 7th September 2006, 12:43
  4. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28
  5. Visual Studio 2003 and .vcproj files
    By mbjerkne in forum General Discussion
    Replies: 2
    Last Post: 1st February 2006, 00:51

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.