/*! * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ /** * Helpers to generate a file tree when the File and Directory API is used (e.g. Drag and Drop or ) */ /** * This is a helper class to allow building a file tree for uploading * It allows to create virtual directories */ export declare class Directory extends File { private _originalName; private _path; private _children; constructor(path: string); get size(): number; get lastModified(): number; get originalName(): string; get children(): Array; get webkitRelativePath(): string; getChild(name: string): File | Directory | null; /** * Add multiple children at once * * @param files The files to add */ addChildren(files: Array): Promise; /** * Add a child to the directory. * If it is a nested child the parents will be created if not already exist. * * @param file The child to add */ addChild(file: File | FileSystemEntry): Promise; } /** * Interface of the internal Directory class */ export type IDirectory = Pick;