/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Directory } from "../fs/Directory.js"; import { DataNamespace } from "./DataNamespace.js"; /** * Consolidates all per-node filesystem concerns. * * Holds a {@link Directory} (the node's data directory, e.g. `~/.matter//`), manages locking, and provides the * base path for sockets, logs, ready files, etc. * * Locking is reference-counted: the physical lock is acquired when the first {@link DatafileRoot.Lock} is created and * released when the last one closes. */ export declare class DatafileRoot extends DataNamespace { #private; constructor(directory: Directory); get directory(): Directory; get path(): string; get isLocked(): boolean; /** * Acquire a reference-counted lock. The physical directory lock is acquired on the first call and released when * the last {@link DatafileRoot.Lock} closes. */ lock(): Promise; } export declare namespace DatafileRoot { /** * A reference-counted handle to the directory lock. Closing the lock decrements the reference count; the physical * lock is released when the last Lock closes. */ class Lock implements AsyncDisposable { #private; constructor(directory: Directory, release: () => Promise); get directory(): Directory; get path(): string; close(): Promise; [Symbol.asyncDispose](): Promise; } } //# sourceMappingURL=DatafileRoot.d.ts.map