import { Emitter, EncodingRegistry, Event, IApplicationService, IEditorDocumentChange, IEditorDocumentModelSaveResult, PreferenceService, URI } from '@opensumi/ide-core-browser'; import { IFileServiceClient } from '@opensumi/ide-file-service'; import { EOL } from '@opensumi/ide-monaco/lib/browser/monaco-api/types'; import { IEditorDocumentModelContentProvider } from '../doc-model/types'; import { EditorPreferences } from '../preference/schema'; export interface ReadEncodingOptions { /** * The optional encoding parameter allows to specify the desired encoding when resolving * the contents of the file. */ encoding?: string; /** * The optional guessEncoding parameter allows to guess encoding from content of the file. */ autoGuessEncoding?: boolean; } /** * 通用的用来处理 FileSystem 提供的文档 * 可以 extend 这个来添加更强的能力,如 file-scheme 中的 file-doc */ export declare class BaseFileSystemEditorDocumentProvider implements IEditorDocumentModelContentProvider { protected _onDidChangeContent: Emitter; onDidChangeContent: Event; protected _fileContentMd5OnBrowserFs: Set; private _detectedEncodingMap; private _detectedEolMap; protected readonly fileServiceClient: IFileServiceClient; protected readonly editorPreferences: EditorPreferences; protected readonly applicationService: IApplicationService; protected readonly preferenceService: PreferenceService; encodingRegistry: EncodingRegistry; constructor(); handlesScheme(scheme: string): boolean; provideEncoding(uri: URI): string; provideEOL(uri: URI): Promise; read(uri: URI, options: ReadEncodingOptions): Promise<{ encoding: string; content: string; eol: EOL; }>; private getEol; provideEditorDocumentModelContent(uri: URI, encoding: string): Promise; isReadonly(uri: URI): Promise; saveDocumentModel(uri: URI, content: string, baseContent: string, changes: IEditorDocumentChange[], encoding: string, ignoreDiff?: boolean): Promise; onDidDisposeModel(uri: URI): void; guessEncoding(uri: URI): Promise; protected getReadEncoding(resource: URI, options: ReadEncodingOptions | undefined, detectedEncoding: string | null): Promise; protected getEncodingForResource(resource: URI, preferredEncoding?: string): Promise; } //# sourceMappingURL=fs-editor-doc.d.ts.map