import type { GetDirectoryOptions, GetFileOptions, IDirectoryHandle, IFileHandle, IFileSystem, RemoveOptions } from "../../../shared/file-system.js"; import { type FileSystemDirectoryName as DirectoryName, type FileSystemDirectoryNameLike as DirectoryNameLike, type FileSystemEntryNameLike as EntryNameLike, type FileSystemFileNameLike as FileNameLike } from "../../../shared/schemas.js"; /** * ディレクトリーのハンドル(操作を可能にする参照)を行うクラスです。OPFS の FileSystemDirectoryHandle を使用します。 */ declare class DirectoryHandle implements IDirectoryHandle { #private; /** * ディレクトリーの絶対パスです。 */ readonly path: string; /** * `DirectoryHandle` の新しいインスタンスを構築します。 * * @param dirPath ディレクトリーのパスです。 * @param native ネイティブの FileSystemDirectoryHandle インスタンスです。 */ constructor(dirPath: readonly DirectoryName[], native: FileSystemDirectoryHandle); /** * ディレクトリー直下から指定のアイテムを削除します。 * * @param name 削除するアイテムの名前です。 * @param options 削除時のオプションです。 */ removeEntry(name: EntryNameLike, options: RemoveOptions): Promise; /** * 指定した名前のファイルハンドルを取得します。 * * @param name 取得するファイルの名前です。 * @param options ファイル取得時のオプションです。 * @returns ファイルのハンドル(操作を可能にする参照)を行うクラスのインスタンスです。 */ getFileHandle(name: FileNameLike, options: GetFileOptions): Promise; /** * 指定した名前のディレクトリーハンドルを取得します。 * * @param name 取得するディレクトリーの名前です。 * @param options ディレクトリー取得時のオプションです。 * @returns ディレクトリーのハンドル(操作を可能にする参照)を行うクラスのインスタンスです。 */ getDirectoryHandle(name: DirectoryNameLike, options: GetDirectoryOptions): Promise; } /** * ファイルシステムを操作するための基本的な機能を提供するクラスです。 * ファイルシステムの接続、切断、およびディレクトリーへのアクセスを可能にします。 */ export default class OriginPrivateFileSystem implements IFileSystem { #private; /** * `OriginPrivateFileSystem` の新しいインスタンスを構築します。 * * @param rootDir 操作の基準となるルートディレクトリーのパスです。デフォルトはルートディレクトリです。 */ constructor(rootDir?: string | undefined); /** * ファイルシステムへの接続を開きます。 */ open(): Promise; /** * ファイルシステムへの接続を閉じます。 */ close(): Promise; /** * ルートディレクトリーを基準に、指定した名前のディレクトリーハンドルを取得します。 * * @param name 取得するディレクトリーの名前です。 * @param options ディレクトリー取得時のオプションです。 * @returns ディレクトリーのハンドル(操作を可能にする参照)を行うクラスのインスタンスです。 */ getDirectoryHandle(name: DirectoryNameLike, options: GetDirectoryOptions): Promise; } export {}; //# sourceMappingURL=origin-private-file-system.d.ts.map