MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / isDartWorkspaceFolder

Function isDartWorkspaceFolder

src/shared/vscode/utils.ts:208–217  ·  view source on GitHub ↗
(folder?: WorkspaceFolder)

Source from the content-addressed store, hash-verified

206}
207
208export function isDartWorkspaceFolder(folder?: WorkspaceFolder): boolean {
209 if (folder?.uri.scheme !== "file")
210 return false;
211
212 // Currently we don't have good logic to know what's a Dart folder.
213 // We could require a pubspec, but it's valid to just write scripts without them.
214 // For now, nothing calls this that will do bad things if the folder isn't a Dart
215 // project so we can review amend this in future if required.
216 return true;
217}
218
219export function toRange(document: TextDocument, offset: number, length: number): Range {
220 return new Range(document.positionAt(offset), document.positionAt(offset + length));

Calls

no outgoing calls

Tested by

no test coverage detected