UNPKG

os-lock

Version:

Cross-platform file locking/unlocking

9 lines (8 loc) 364 B
interface LockOptions { exclusive?: boolean; immediate?: boolean; } declare function lock(fd: number, options: LockOptions): Promise<void>; declare function lock(fd: number, start?: number, length?: number, options?: LockOptions): Promise<void>; declare function unlock(fd: number, start?: number, length?: number): Promise<void>; export { lock, unlock };