import { VSBufferReadable, VSBuffer, VSBufferReadableStream } from "../../../../base/common/buffer.js";
import { IDisposable } from "../../../../base/common/lifecycle.js";
import { ReadableStream } from "../../../../base/common/stream.js";
import { URI } from "../../../../base/common/uri.js";
import { ITextSnapshot } from "../../../../editor/common/model.js";
import { IFileStatWithMetadata } from "../../../../platform/files/common/files.js";
import { IRevertOptions } from "../../../common/editor.js";
import { IUntitledTextEditorModelManager } from "@codingame/monaco-vscode-view-common-service-override/vscode/vs/workbench/services/untitled/common/untitledTextEditorService";
import { IFileOperationUndoRedoInfo } from "@codingame/monaco-vscode-base-service-override/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService";
import { ITextFileEditorModelManager, IResourceEncodings, ITextFileSaveOptions, ITextFileSaveAsOptions, IReadTextFileOptions, ITextFileContent, ITextFileStreamContent, IWriteTextFileOptions, IReadTextFileEncodingOptions } from "./textfiles.js";
export declare const ITextFileService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier<ITextFileService>;
export interface ITextFileService extends IDisposable {
    readonly _serviceBrand: undefined;
    readonly files: ITextFileEditorModelManager;
    readonly untitled: IUntitledTextEditorModelManager;
    readonly encoding: IResourceEncodings;
    isDirty(resource: URI): boolean;
    save(resource: URI, options?: ITextFileSaveOptions): Promise<URI | undefined>;
    saveAs(resource: URI, targetResource?: URI, options?: ITextFileSaveAsOptions): Promise<URI | undefined>;
    revert(resource: URI, options?: IRevertOptions): Promise<void>;
    read(resource: URI, options?: IReadTextFileOptions): Promise<ITextFileContent>;
    readStream(resource: URI, options?: IReadTextFileOptions): Promise<ITextFileStreamContent>;
    write(resource: URI, value: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise<IFileStatWithMetadata>;
    create(operations: {
        resource: URI;
        value?: string | ITextSnapshot;
        options?: {
            overwrite?: boolean;
        };
    }[], undoInfo?: IFileOperationUndoRedoInfo): Promise<readonly IFileStatWithMetadata[]>;
    getEncodedReadable(resource: URI, value: ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBufferReadable>;
    getEncodedReadable(resource: URI, value: string, options?: IWriteTextFileOptions): Promise<VSBuffer>;
    getEncodedReadable(resource: URI, value?: ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBufferReadable | undefined>;
    getEncodedReadable(resource: URI, value?: string, options?: IWriteTextFileOptions): Promise<VSBuffer | undefined>;
    getEncodedReadable(resource: URI, value?: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBuffer | VSBufferReadable | undefined>;
    getDecodedStream(resource: URI, value: VSBufferReadableStream, options?: IReadTextFileEncodingOptions): Promise<ReadableStream<string>>;
}
