Results 1 to 4 of 4

Thread: How to detect if a file is being used?

  1. #1
    Join Date
    Dec 2008
    Posts
    68

    Default How to detect if a file is being used?

    Hi,

    My application is going to load a file and modify. Before loading the file, is there anyway to find out if the file is being opened by another application?

    thank you!

  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: How to detect if a file is being used?

    Only if that other application has locked it (works in some file systems) or if you device a locking scheme (usually a hidden file)

  3. #3
    Join Date
    Dec 2008
    Posts
    68

    Default Re: How to detect if a file is being used?

    Does QT provide any function to check it?

  4. #4
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: How to detect if a file is being used?

    You can use QtLockedFile

Similar Threads

  1. Read binary from file
    By weldpua2008 in forum Newbie
    Replies: 2
    Last Post: 3rd April 2009, 23:50
  2. Can you specify a file engine?
    By skimber in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2008, 15:54
  3. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  4. file renaming on windows
    By jdd81 in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2007, 19:41
  5. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

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.