FileSystemAccessApiClientOptions: {
    enableCache: boolean;
    initRetryDelayMs: number;
    maxRetries: number;
    onError: ErrorCallback;
    onRetry: RetryCallback;
    useSyncAccessHandle: boolean;
}

Configuration options for the FileSystemAccessApiFsClient.

Type declaration

  • enableCache: boolean

    When true, enable an in-memory cache of directory handles to avoid repeated handle lookups for the same paths.

  • initRetryDelayMs: number

    Initial delay in milliseconds used for exponential backoff when retrying operations. Each retry doubles the delay (plus some jitter).

  • maxRetries: number

    Maximum number of retry attempts for transient errors (e.g. browser UnknownError) before giving up.

  • onError: ErrorCallback

    Called when a non-retriable error occurs (or when retries are exhausted). Receives the operation name, the error, and an optional path.

  • onRetry: RetryCallback

    Called before each retry attempt. Receives the operation name, the attempt number, the error that triggered the retry, and an optional path.

  • useSyncAccessHandle: boolean

    If true, use the synchronous access handle API (OPFS) for writes when available. This can improve write performance in supporting browsers.

Generated using TypeDoc