vscode-web
vscode-web copied to clipboard
how can I use it as a service to open each sub folder from root
I have created a directory D:/h5apps , how can I use vscode-web to open each sub directories, just like:
http://host:8080/edit/app01 ==> D:/h5apps/app01
http://host:8080/edit/app02 ==> D:/h5apps/app02
http://host:8080/edit/app03 ==> D:/h5apps/app03
thank you
Hi
I think you will have to code an extension for that
You'll have to code a filesystemprovider in an extension, and then, in the index.html file, you'll have to provide a window.product variable with dynamic folderUri
const currentUrl = new URL(window.location.href);
const path = currentUrl.pathname.substring(1);
window.product = {
productConfiguration: {
nameShort: "My Code Browser",
...
},
folderUri: {
scheme: "myCustomScheme",
path,
}
}
And then in your extension you'll be able to use vscode.workspace.workspaceFolders[0].uri
to know the current uri.
With the uri you'll be able to match the correct forlder to query on server.