Results 1 to 3 of 3

Thread: QFileInfo for directory does not respond to 'touch'

  1. #1
    Join Date
    Jul 2008
    Location
    East Coast, USA
    Posts
    40
    Thanks
    6
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question QFileInfo for directory does not respond to 'touch'

    Hi Everyone,

    QFileInfo::lastModified() for a directory will give me the last modified time correctly if a file has been altered, but not 'touch'-ed. Is this known behavior. Why is this?

    Thanks
    -K

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileInfo for directory does not respond to 'touch'

    What do u mean by touch-ed ??

  3. #3
    Join Date
    Jul 2008
    Location
    East Coast, USA
    Posts
    40
    Thanks
    6
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Thumbs up Re: QFileInfo for directory does not respond to 'touch'

    Hmm, I didn't understand 'touch'. Touching a file will alter its modified date BUT will not affect the super-directory, so QT is doing just fine, I was mistaken.

    Aamer - 'touch' is a unix command to change the file's last modified property without actually altering the file.

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.