/// <reference types="node" />
import Client from "./client";
import FileSystemElement from "./fileSystemElement";
import Folder from "./folder";
/**
 * The file class represents a file in nextcloud.
 * It exposes file properties and content handling, commenting and tagging
 */
export default class File implements FileSystemElement {
    private memento;
    private client;
    constructor(client: Client, name: string, baseName: string, lastmod: string, size: number, mime: string, id: number);
    /**
     * The name of the file including the path
     * The name is readonly
     */
    get name(): string;
    /**
     * The base name of the file (file name without path)
     * The base name is readonly
     */
    get baseName(): string;
    /**
     * The timestamp of the last file change
     * readonly
     */
    get lastmod(): Date;
    /**
     * The file size in bytes
     * readonly
     */
    get size(): number;
    /**
     * The mime type (content type) of the file
     */
    get mime(): string;
    /**
     * The unique id of the file.
     */
    get id(): number;
    /**
     * deletes a file
     * @throws Error
     */
    delete(): Promise<void>;
    /**
     * get folder of the file
     * @throws ClientError
     * @returns the parent folder
     */
    getFolder(): Promise<Folder>;
    /**
     * moves or renames the current file to the new location
     * target folder must exists
     * @param targetFileName the name of the target file /f1/f2/myfile.txt
     * @throws Error
     */
    move(targetFileName: string): Promise<File>;
    /**
     * @returns the buffer of the file content
     * @throws Error
     */
    getContent(): Promise<Buffer>;
    /**
     * @returns the url of the file
     * @throws Error
     */
    getUrl(): string;
    /**
     * @returns the url of the file in the UI
     * @throws Error
     */
    getUIUrl(): string;
    /**
     * adds a tag name to the file
     * @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 file
     * @param comment the comment
     */
    addComment(comment: string): Promise<void>;
    /**
     * get list of comments of file
     * @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;
}
