Skip to content

Commit 7d9cb22

Browse files
author
Barry Jaspan
committed
Document VscodeFilesystem.readFileUtf8FromRoot.
1 parent 9f6a30f commit 7d9cb22

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/cursorless-vscode/src/ide/vscode/VscodeFileSystem.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ export class VscodeFileSystem implements FileSystem {
4242
return path.substring(0, path.lastIndexOf("/"));
4343
}
4444

45+
/**
46+
* Reads a file under the extensionUri of the extensionContext passed to
47+
* the constructor.
48+
*
49+
* @param path path to read
50+
* @returns the contents of path, decoded as UTF-8
51+
*/
4552
public async readFileUtf8FromRoot(path: string): Promise<string> {
4653
return this.decoder.decode(
4754
await vscode.workspace.fs.readFile(

0 commit comments

Comments
 (0)