vscode.d.ts - clarify how to open an untitled file with associated file path (for #129060)

This commit is contained in:
Benjamin Pasero
2021-08-04 11:32:24 +02:00
parent ff69e14f5d
commit 4edcb2906d
+4 -3
View File
@@ -10679,9 +10679,10 @@ declare module 'vscode' {
*
* The document is denoted by an {@link Uri}. Depending on the {@link Uri.scheme scheme} the
* following rules apply:
* * `file`-scheme: Open a file on disk, will be rejected if the file does not exist or cannot be loaded.
* * `untitled`-scheme: A new file that should be saved on disk, e.g. `untitled:c:\frodo\new.js`. The language
* will be derived from the file name.
* * `file`-scheme: Open a file on disk (`openTextDocument(Uri.file(path))`). Will be rejected if the file
* does not exist or cannot be loaded.
* * `untitled`-scheme: Open a blank untitled file with associated path (`openTextDocument(Uri.file(path).with({ scheme: 'untitled' }))`).
* The language will be derived from the file name.
* * For all other schemes contributed {@link TextDocumentContentProvider text document content providers} and
* {@link FileSystemProvider file system providers} are consulted.
*