Locks a file in exclusive or shared mode.
Character. The path.
Logical. The lock type, exclusive or shared.
The file is created if it doesn't exist.
Returns an object of type
FileLock, which is to be
used for the
1 2 3 4 5 6 7 8