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?

Is possible to set QFile share permission?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.6k Views
  • 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 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 last edited by
      #2

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

      1 Reply Last reply
      0
      • A Offline
        A Offline
        antonyprojr
        wrote on 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 last edited by
          #4

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

          1 Reply Last reply
          0

          • Login

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