Unlock
 
Releases a file range lock

Syntax

Unlock #filenum, record
Unlock #filenum, start To end

Parameters

filenum
The file number used to Open the file.
record
The record (Random files) to unlock.
start
The first byte position (Binary files) in a range to unlock.
end
The last byte position (Binary files) in a range to unlock.

Description

Unlock releases the byte or record range locked by Lock. The first and final positions are inclusive.

Use the same arguments as the matching Lock. On Unix-like systems, file locks are advisory. Native unlock failures set a file I/O error, and targets without native byte-range locking report the operation as unsupported.

Example

For an example see Lock.

Differences from QB

  • A single position or explicit range is required; the entire file cannot be unlocked implicitly

See also