Is possible to set QFile share permission?
-
wrote on 29 Jun 2013, 17:41 last edited by
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!
-
wrote on 29 Jun 2013, 19:22 last edited by
-
wrote on 29 Jun 2013, 19:38 last edited by
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?
-
wrote on 29 Jun 2013, 21:45 last edited by
2/4