import type { CID } from "multiformats/cid";
import { AddResult, FileContent } from "../../ipfs/index.js";
import { Maybe } from "../../common/index.js";
import { Path } from "../../path.js";
import { Tree, File, UnixTree, Links, UpdateCallback } from "../types.js";
declare abstract class BaseTree implements Tree, UnixTree {
    readOnly: boolean;
    constructor();
    put(): Promise<CID>;
    ls(path: Path): Promise<Links>;
    cat(path: Path): Promise<FileContent>;
    mkdir(path: Path): Promise<this>;
    mkdirRecurse(path: Path, onUpdate: Maybe<UpdateCallback>): Promise<this>;
    add(path: Path, content: FileContent): Promise<this>;
    addRecurse(path: Path, content: FileContent, onUpdate: Maybe<UpdateCallback>): Promise<this>;
    rm(path: Path): Promise<this>;
    rmRecurse(path: Path, onUpdate: Maybe<UpdateCallback>): Promise<this>;
    mv(from: Path, to: Path): Promise<this>;
    exists(path: Path): Promise<boolean>;
    read(path: Path): Promise<Tree | File | null>;
    write(path: Path, content: FileContent): Promise<this>;
    getOrCreateDirectChild(name: string, onUpdate: Maybe<UpdateCallback>): Promise<Tree | File>;
    /**
    * `put` is called on child (result of promise) in `updateDirectChild`
    * Then for the outermost parent, `put` should be called manually.
    */
    updateChild(child: Tree | File, path: Path): Promise<this>;
    abstract createChildTree(name: string, onUpdate: Maybe<UpdateCallback>): Promise<Tree>;
    abstract createOrUpdateChildFile(content: FileContent, name: string, onUpdate: Maybe<UpdateCallback>): Promise<File>;
    abstract putDetailed(): Promise<AddResult>;
    abstract updateDirectChild(child: Tree | File, name: string, onUpdate: Maybe<UpdateCallback>): Promise<this>;
    abstract removeDirectChild(name: string): this;
    abstract getDirectChild(name: string): Promise<Tree | File | null>;
    abstract get(path: Path): Promise<Tree | File | null>;
    abstract updateLink(name: string, result: AddResult): this;
    abstract getLinks(): Links;
}
export default BaseTree;
