mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Merge pull request #52330 from Microsoft/isidorn/fsReadonly
fileSystemProvider: isReadonly
This commit is contained in:
@@ -83,7 +83,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
|
||||
extHostLanguageFeatures.registerDocumentLinkProvider('*', this._linkProvider);
|
||||
}
|
||||
|
||||
registerFileSystemProvider(scheme: string, provider: vscode.FileSystemProvider, options: { isCaseSensitive?: boolean } = {}) {
|
||||
registerFileSystemProvider(scheme: string, provider: vscode.FileSystemProvider, options: { isCaseSensitive?: boolean, isReadonly?: boolean } = {}) {
|
||||
|
||||
if (this._usedSchemes.has(scheme)) {
|
||||
throw new Error(`a provider for the scheme '${scheme}' is already registered`);
|
||||
@@ -98,6 +98,9 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
|
||||
if (options.isCaseSensitive) {
|
||||
capabilites += files.FileSystemProviderCapabilities.PathCaseSensitive;
|
||||
}
|
||||
if (options.isReadonly) {
|
||||
capabilites += files.FileSystemProviderCapabilities.Readonly;
|
||||
}
|
||||
if (typeof provider.copy === 'function') {
|
||||
capabilites += files.FileSystemProviderCapabilities.FileFolderCopy;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user