How to lock files

Interleaf quicksilver Frequently asked questions

how to lock files?

A lock file is a file that is created when a document or desktop is in use. The lock file is linked to the user and host process ID of the first user who accesses the document or desktop.
Lock files help prevent unintended loss of data when multiple users access the same document or desktop. Normally, lock files are removed when you save and close a document, or exit QuickSilver. If a document or desktop closes abnormally, as the result of a software crash, for example, the lock file(s) are not removed and you are notified that the desktop or document is locked the next time you open it.

Lock Files in the Operating System
In QuickSilver, lock files in QuickSilver containers are the same on both the Windows and UNIX platforms.

  • A document lock file is represented as follows: filename.ildoc#
  • A desktop lock file is represented as follows: clipboard.clp#

Within Interleaf 6 containers in QuickSilver, lock files are the same as they were in Interleaf 6.

  • (Windows) Document lock files are represented as follows:
  • (UNIX) Document lock files are represented as follows: .#filename.doc

Overriding Locks
When you try to access a document or desktop that is in use, a message box informs you that the document or desktop is currently in use and it identifies the user. When you override the message box to access the document or desktop, a new lock file that identifies you as the new user is created.

Important: When more than one user accesses a document at the same time, saving document changes must be coordinated between users. If the last user to access the document chooses Save, changes made by the first user are lost.

NOTE: If you do not want other users to write to, or even read, a particular document on your desktop, you can deny these permissions in the file properties. However, as system administrator, you can read any document, regardless of the permissions granted.
A lock file also may be created when there is a system crash, and QuickSilver has not been exited properly. The next time the user attempts to access the desktop, a message box notifies the user that the desktop is locked. Override the message box to unlock the desktop.

Deleting Desktop Locks
If a document or desktop remains locked after you override the message boxes, you can delete the lock file through the operating system.

  • (Windows) Use the del command to delete the lock file.
  • (UNIX) Use the rm command to remove the lock file.