export declare const isFileSystemFileEntry: (entry: FileSystemEntry) => entry is FileSystemFileEntry; export declare const isFileSystemDirectoryEntry: (entry: FileSystemEntry) => entry is FileSystemDirectoryEntry; export type FolderGroup = { /** The subfolder name, or an empty string for files sitting at the dropped folder's root. */ folderName: string; files: File[]; }; export declare const sortFolderGroups: (groups: FolderGroup[]) => FolderGroup[]; export declare const readDirectoryFiles: (directoryEntry: FileSystemDirectoryEntry) => Promise; /** * Groups already-collected files (e.g. from a `webkitdirectory` folder picker) by their top-most * subfolder, mirroring {@link readDirectoryFolders}. Grouping uses each file's * `webkitRelativePath`, whose first segment is the picked folder itself: * * - Files under an immediate subfolder are grouped under that subfolder's name (deeper nesting is * flattened into it). * - Files sitting directly in the picked folder go into a trailing group with an empty * `folderName` (a default, unnamed section). * * Expects the input to already be filtered to accepted file types. */ export declare const groupFilesBySubfolder: (files: File[]) => FolderGroup[]; /** * The picked folder's own name: the first segment of the same `webkitRelativePath` format * {@link groupFilesBySubfolder} groups by, so it is the picked folder whether its files sit at that * folder's root or deeper. Undefined for files carrying no relative path, which is what a drop * produces. */ export declare const getRootFolderName: (files: File[]) => string | undefined; /** * Reads a dropped directory and groups its files by top-level subfolder, so a batch can be laid * out as one section per subfolder. * * - Each immediate subfolder becomes a group named verbatim after it, containing every accepted * file found recursively within it (flattened). * - Accepted files sitting directly in the dropped folder are returned in a trailing group with an * empty `folderName` (a default, unnamed section). * - Empty subfolders (no accepted file anywhere inside) are skipped. */ export declare const readDirectoryFolders: (directoryEntry: FileSystemDirectoryEntry) => Promise; //# sourceMappingURL=files.d.ts.map