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. Is possible to set QFile share permission?
Forum Updated to NodeBB v4.3 + New Features

Is possible to set QFile share permission?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.6k Views 1 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
    antonyprojr
    wrote on 29 Jun 2013, 17:41 last edited by
    #1

    I’m developing a program that uses QFile to write into a file, and I want to lock that file from being read or written by another application, for example: while my application is writing to a .txt file, lock that file from being read or written by Notepad or any other app. Does Qt provides a cross plataform or Windows specific way to do this? I’ve searched at the QFile documentation but I don’t found it!

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bagipro
      wrote on 29 Jun 2013, 19:22 last edited by
      #2

      http://qt-project.org/forums/viewthread/24307

      1 Reply Last reply
      0
      • A Offline
        A Offline
        antonyprojr
        wrote on 29 Jun 2013, 19:38 last edited by
        #3

        Extracted from: http://doc.qt.digia.com/solutions/3/qtlockedfile/qtlockedfile.html "The file locks are advisory. This means that nothing prevents another process from manipulating a locked file using QFile or file system functions offered by the OS. Serialization is only guaranteed if all processes that access the file use QLockedFile." And i want some way to lock any another process to use that file, not only the process that uses QtLockedFile. Is this possible?

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bagipro
          wrote on 29 Jun 2013, 21:45 last edited by
          #4

          http://www.qtcentre.org/archive/index.php/t-21447.html

          1 Reply Last reply
          0

          2/4

          29 Jun 2013, 19:22

          • Login

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