chickadee » chicken » file » posix » file-lock

file-lock PORT #!optional START LENprocedure

Locks the file associated with PORT for reading or writing (according to whether PORT is an input- or output-port). START specifies the starting position in the file to be locked and defaults to 0. LEN specifies the length of the portion to be locked and defaults to #t, which means the complete file. file-lock returns a lock-object.

NOTE: On native Windows builds (all except cygwin), this procedure is unimplemented and will raise an error.