66#nullable disable
77
88using System ;
9- using System . Collections . Generic ;
109using System . IO ;
1110using System . Text ;
1211using System . Text . RegularExpressions ;
@@ -28,13 +27,6 @@ public partial class Workspace : IDisposable
2827 #region Private Fields
2928
3029 private const string UntitledScheme = "untitled" ;
31- private static readonly HashSet < string > fileUriSchemes = new HashSet < string > ( StringComparer . OrdinalIgnoreCase )
32- {
33- "file" ,
34- UntitledScheme ,
35- "tsqloutput" ,
36- "vscode-notebook-cell"
37- } ;
3830
3931 private ConcurrentDictionary < string , ScriptFile > workspaceFiles = new ConcurrentDictionary < string , ScriptFile > ( ) ;
4032
@@ -94,10 +86,6 @@ public bool ContainsFile(string filePath)
9486 public virtual ScriptFile GetFile ( string filePath )
9587 {
9688 Validate . IsNotNullOrWhitespaceString ( "filePath" , filePath ) ;
97- if ( IsNonFileUri ( filePath ) )
98- {
99- return null ;
100- }
10189
10290 // Resolve the full file path
10391 ResolvedFile resolvedFile = this . ResolveFilePath ( filePath ) ;
@@ -221,10 +209,6 @@ public static string UnescapePath(string path)
221209 public ScriptFile GetFileBuffer ( string filePath , string initialBuffer )
222210 {
223211 Validate . IsNotNullOrWhitespaceString ( "filePath" , filePath ) ;
224- if ( IsNonFileUri ( filePath ) )
225- {
226- return null ;
227- }
228212
229213 // Resolve the full file path
230214 ResolvedFile resolvedFile = this . ResolveFilePath ( filePath ) ;
@@ -331,15 +315,6 @@ public static string GetScheme(string uri)
331315 return null ;
332316 }
333317
334- private bool IsNonFileUri ( string path )
335- {
336- string scheme = GetScheme ( path ) ;
337- if ( ! string . IsNullOrEmpty ( scheme ) )
338- {
339- return ! fileUriSchemes . Contains ( scheme ) ; ;
340- }
341- return false ;
342- }
343318
344319 private bool IsUntitled ( string path )
345320 {
0 commit comments