/// <reference types="node" />
import Client from "./client";
import File from "./file";
import FileSystemElement from "./fileSystemElement";
export interface FolderGetFilesOptions {
    /**
     * callback function to filter files
     */
    filterFile?: (file: File) => File | null;
}
export default class Folder implements FileSystemElement {
    private client;
    private memento;
    constructor(client: Client, name: string, baseName: string, lastmod: string, id?: number);
    get name(): string;
    get baseName(): string;
    get lastmod(): Date;
    get id(): number;
    /**
     * @returns an array of subfolders
     * @throws Error
     */
    getSubFolders(): Promise<Folder[]>;
    /**
     * returns true if the current folder has a subfolder with the given base name
     * @param subFolderBaseName the base name of the subfolder like "products"
     */
    hasSubFolder(subFolderBaseName: string): Promise<boolean>;
    /**
     * @returns all files of the folder
     */
    getFiles(options?: FolderGetFilesOptions): Promise<File[]>;
    /**
     * creates a subfolder
     * @param subFolderBaseName  name of the subfolder basename
     */
    createSubFolder(subFolderBaseName: string): Promise<Folder>;
    /**
     * get a file by basename
     * @param fileBaseName the base name of the file
     * @returns the file of null
     * @throws Error
     */
    getFile(fileBaseName: string): Promise<File | null>;
    /**
     * creates a file in the folder
     * @param fileBaseName the base name of the file
     * @param data the buffer or stream with file content
     * @returns the new file or null
     * @throws Error
     */
    createFile(fileBaseName: string, data: Buffer | NodeJS.ReadableStream): Promise<File>;
    /**
     * deletes the folder and the contained files
     * @throws Error
     */
    delete(): Promise<void>;
    /**
     * renames or moves the current folder to the new location
     * target folder must exists
     * @param targetFolderName the name of the target folder /f1/f2/target
     * @throws Error
     */
    move(targetFolderName: string): Promise<Folder>;
    /**
     * @returns the url of the folder
     * @throws Error
     */
    getUrl(): string;
    /**
     * @returns the url of the folder in the UI
     * @throws Error
     */
    getUIUrl(): string;
    /**
     * @returns true if the folder contains a file with the given basename
     * @param fileBaseName file basename
     * @throws Error
     */
    containsFile(fileBaseName: string): Promise<boolean>;
    /**
     * adds a tag name to the folder
     * @param tagName name of the tag
     */
    addTag(tagName: string): Promise<void>;
    /**
     * get tag names
     * @returns array of tag names
     */
    getTags(): Promise<string[]>;
    /**
     * removes a tag of the file
     * @param tagName the name of the tag
     */
    removeTag(tagName: string): Promise<void>;
    /**
     * add comment to folder
     * @param comment the comment
     */
    addComment(comment: string): Promise<void>;
    /**
     * get list of comments of folder
     * @param top number of comments to return
     * @param skip the offset
     * @returns array of comment strings
     * @throws Exception
     */
    getComments(top?: number, skip?: number): Promise<string[]>;
    private assertExistence;
}
