Read Only workspace #7045
-
I want to build a library viewer using Code-Server where the workspace is read-only but can still display the library structure using Java Projects. Additionally, I want users to be redirected to the default workspace if they attempt to access a non-existent one. Is this possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You could maybe try making the files read-only on the disk, but I am not aware of a read-only mode for code-server itself. It might be possible by implementing your own file provider? I think this is how the live share extension does it, so you might check that for inspiration. As for the redirect, you might be able to check the current workspace and then open a new one using an extension ( None of this is specific to code-server, so you might find better answers upstream with VS Code itself. |
Beta Was this translation helpful? Give feedback.
You could maybe try making the files read-only on the disk, but I am not aware of a read-only mode for code-server itself. It might be possible by implementing your own file provider? I think this is how the live share extension does it, so you might check that for inspiration.
As for the redirect, you might be able to check the current workspace and then open a new one using an extension (
commands.executeCommand("vscode.openFolder", uri)
).None of this is specific to code-server, so you might find better answers upstream with VS Code itself.