コンテンツにスキップ

Editor

このコンテンツはまだ日本語訳がありません。

Host interface responsible for applying diffs on disk.

createFile(operation, context?): Promise<
| void
| ApplyPatchResult>;

Creates a new file from a V4A diff.

Parameter Type

operation

{ diff: string; path: string; type: "create_file"; }

operation.diff

string

operation.path?

string

operation.type?

"create_file"

context?

EditorInvocationContext

Promise< | void | ApplyPatchResult>


deleteFile(operation, context?): Promise<
| void
| ApplyPatchResult>;

Deletes an existing file.

Parameter Type

operation

{ path: string; type: "delete_file"; }

operation.path

string

operation.type?

"delete_file"

context?

EditorInvocationContext

Promise< | void | ApplyPatchResult>


updateFile(operation, context?): Promise<
| void
| ApplyPatchResult>;

Updates an existing file based on a V4A diff.

Parameter Type

operation

{ diff: string; path: string; type: "update_file"; }

operation.diff

string

operation.path?

string

operation.type?

"update_file"

context?

EditorInvocationContext

Promise< | void | ApplyPatchResult>