Arjinoodles
Arjinoodles

Reputation: 75

How to create a new file inside vs code using browser protocols

I'm trying to create a new file using browser protocols However, I don't know the name of the protocol and can't find any docs.

for example vscode:new-file://snippet.txt

Upvotes: 0

Views: 177

Answers (1)

Charlie
Charlie

Reputation: 23838

VS Code does not offer creation of files via the browser protocol as of version 1.58. However it allows opening of files and folders using this method.

vscode://file/{full path}/

Example -

vscode://file/c:/myProject/package.json

Note that you can use these urls directly in Windows Explorer too.

Documentation: https://code.visualstudio.com/docs/editor/command-line#_opening-vs-code-with-urls

Upvotes: 1

Related Questions