Theia API Documentation v1.65.0
    Preparing search index...

    Use this backend service to help prevent race access to files on disk.

    interface FileSystemLocking {
        lockPath<T>(
            lockPath: string,
            transaction: (lockPath: string) => T | Promise<T>,
            thisArg?: unknown,
        ): Promise<T>;
    }

    Implemented by

    Index

    Methods

    Methods

    • Get exclusive access to a file for reading and/or writing.

      Type Parameters

      • T

      Parameters

      • lockPath: string

        The path to request exclusive access to.

      • transaction: (lockPath: string) => T | Promise<T>

        The job to do while having exclusive access.

      • OptionalthisArg: unknown

        this argument used when calling transaction.

      Returns Promise<T>