Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved File operation

    General and Desktop
    c++ qt programming
    2
    2
    516
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Ashwinimehra last edited by

      I am opening a file for writing using
      QFile file(FILEPATH)
      file.open(QFile.ReadWrite)

      The file operation is working fine. But, it does not disallow user to delete the file while writing operation is in progress.

      I need to make sure if file is open for writing by my program then no user can manually delete it or cannot delete the directory where the gile is present.
      This task is being performed in linux qt 4.8

      mrjj 1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion @Ashwinimehra last edited by

        @Ashwinimehra
        Hi and welcome
        Its outside the scope of Qt but linux does support it
        http://www.thegeekstuff.com/2012/04/linux-file-locking-types/

        1 Reply Last reply Reply Quote 2
        • First post
          Last post