UNPKG

cross-process-lock

Version:

Cross-process file locking solution with lock-queue

18 lines (17 loc) 561 B
export interface LockMetadata { pID: number; lockTime: number; } /** * Reads metadata from the given file * @param {string} file - path to file to read metadata from * @returns {Promise} */ export declare const readMetadata: (file: string) => Promise<LockMetadata>; /** * Saves metadata to the given file * @param {string} file - path to file to write metadata to * @param {number} lockTime - timestamp when lock should be registered * @returns {Promise} */ export declare const saveMetadata: (file: string, lockTime: number) => Promise<void>;