Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. File operation
Forum Updated to NodeBB v4.3 + New Features

File operation

Scheduled Pinned Locked Moved Unsolved General and Desktop
c++qt programming
2 Posts 2 Posters 830 Views 2 Watching
  • 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 Offline
    A Offline
    Ashwinimehra
    wrote on 14 Aug 2017, 09:06 last edited by
    #1

    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

    M 1 Reply Last reply 14 Aug 2017, 09:35
    0
    • A Ashwinimehra
      14 Aug 2017, 09:06

      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

      M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 14 Aug 2017, 09:35 last edited by
      #2

      @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
      2

      2/2

      14 Aug 2017, 09:35

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved