Results 1 to 3 of 3

Thread: QFileSystemWatcher

  1. #1
    Join Date
    Aug 2006
    Posts
    221
    Thanks
    3
    Thanked 29 Times in 19 Posts

    Default QFileSystemWatcher

    Anybody experiences with this?
    What I'd like to know is when does the fileChanged signal fires? When I start writing a file, or when the operation is completed? For instance, when I write a 1GB file there is quite a difference between the start of the write and its completion.

    I admit, under Linux I could try it myself, but this still wouldn't tell me whether the behaviour is defined and can be expected to work the same under all platforms.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QFileSystemWatcher

    Hi Guido,

    The class probably reacts to changes in the meta-data associated with the file and that will in general get updated after the write is complete (especially now that we have journalling file systems). But probably the best answer is "it depends on the file system".

  3. #3
    Join Date
    Mar 2008
    Location
    Norway
    Posts
    7
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileSystemWatcher

    As for experience, I am using it for a tool that parses a log file from an external application (on Windows). So I let the QFileSystemWatcher notify my program when there is new data in the logfile.

    Unfortunately I do not know when or what actually causes the signal to be triggered, but I think wysota is right that it is when the meta data about the file is changed in the file system.

Similar Threads

  1. Replies: 3
    Last Post: 21st August 2009, 11:39
  2. QFileSystemWatcher
    By minty in forum Qt Programming
    Replies: 13
    Last Post: 22nd May 2007, 15:39
  3. Broken QFileSystemWatcher in Qt 4.2.3 under Windows?
    By No-Nonsense in forum Qt Programming
    Replies: 4
    Last Post: 28th March 2007, 14:14
  4. Need help with QFileSystemWatcher
    By L.Marvell in forum Qt Programming
    Replies: 1
    Last Post: 18th August 2006, 13:19
  5. QFileSystemWatcher Question (Qt 4.1.2tp)
    By momesana in forum Qt Programming
    Replies: 8
    Last Post: 25th July 2006, 14:01

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.