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 "@codingame/monaco-vscode-4893679b-56e5-52c5-a8fb-c366cce9660f-common/vscode/vs/workbench/services/textfile/common/textfiles";
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[]>;
    getEncoding(resource: URI): string;
    getEncodedReadable(resource: URI | undefined, value: ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBufferReadable>;
    getEncodedReadable(resource: URI | undefined, value: string, options?: IWriteTextFileOptions): Promise<VSBuffer | VSBufferReadable>;
    getEncodedReadable(resource: URI | undefined, value?: ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBufferReadable | undefined>;
    getEncodedReadable(resource: URI | undefined, value?: string, options?: IWriteTextFileOptions): Promise<VSBuffer | VSBufferReadable | undefined>;
    getEncodedReadable(resource: URI | undefined, value?: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise<VSBuffer | VSBufferReadable | undefined>;
    getDecodedStream(resource: URI | undefined, value: VSBufferReadableStream, options?: IReadTextFileEncodingOptions): Promise<ReadableStream<string>>;
}
