મુખ્ય સામગ્રીને બાયપાસ કરો

@php-wasm/node

Index

Type Aliases

Fd

Fd: number

FileLockManager

FileLockManager: { findFirstConflictingByteRangeLock: (path: string, desiredLock: RequestedRangeLock) => Omit<RequestedRangeLock, fd> | undefined; lockFileByteRange: (path: string, requestedLock: RequestedRangeLock) => boolean; lockWholeFile: (path: string, op: WholeFileLockOp) => boolean; releaseLocksForProcess: (pid: number) => void; releaseLocksForProcessFd: (pid: number, fd: number, path: string) => void }

This is an interface used to abstract byte range locking like fcntl() and whole-file locking like flock().


Type declaration

Pid

Pid: number

RequestedRangeLock

RequestedRangeLock: Readonly<{ end: bigint; pid: Pid; start: bigint; type: shared | exclusive | unlocked }>

WholeFileLock

WholeFileLockOp

WholeFileLockOp: { fd: number; pid: number; type: shared | exclusive | unlock }

Type declaration

  • fd: number
  • pid: number
  • type: shared | exclusive | unlock

WholeFileLock_Exclusive

WholeFileLock_Exclusive: { fd: Fd; pid: Pid; type: exclusive }

Type declaration

  • fd: Fd
  • pid: Pid
  • type: exclusive

WholeFileLock_Shared

WholeFileLock_Shared: { pidFds: Map<Pid, Set<Fd>>; type: shared }

Type declaration

  • pidFds: Map<Pid, Set<Fd>>

    NOTE: flock() locks are associated with open file descriptors and duplicated file descriptors. We do not currently recognize duplicate file descriptors.

  • type: shared

WholeFileLock_Unlocked

WholeFileLock_Unlocked: { type: unlocked }

Type declaration

  • type: unlocked