Lock file
- Parameters:
-
- Returns:
- true if successful, otherwise returns false.
int fd = open(...);
if(qFileLock(fd) == true) {
(...atomic file access...)
qFileUnlock(fd);
}
FILE *fp = fopen(...);
int fd = fileno(fp);
if(qFileLock(fd) == true) {
(...atomic file access...)
qFileUnlock(fd);
}
Definition at line 65 of file qFile.c.