Files
vscode-extension-samples/fsconsumer-sample
Matt Bierner 2ee6b0b7b9 Update all of our samples to target VSCode 1.100 or newer
This makes sure that if folks get a relatively recent `vscode.d.ts`. It also lets us safely bump up the target to es2024 so you can use all the latest lib additions
2025-08-07 07:57:14 -07:00
..
2020-05-29 14:20:07 -07:00
2024-10-26 17:44:03 -07:00
2024-11-26 22:59:45 -08:00
2019-07-23 10:27:48 +02:00

FileSystem Usage Sample

This is a sample extension that shows how to use the vscode.workspace.fs API. It is a series of commands, all prefixed with FS, that demonstrate file system capabilities and how to derive file-uris from existing uris.

Derive new paths with path.posix

Throughout this sample path.posix is being used. This is important because uri paths are always slash-separated (/) and because the backslash (\) can be a valid file name. For more details see: https://nodejs.org/dist/latest-v10.x/docs/api/path.html#path_windows_vs_posix

How it works, what it shows?

  • The extension registers different commands that use the workspace.fs-API.
  • Registers command and the corresponding activation events via package.json

How to run locally

  • npm run watch to start the compiler in watch mode
  • open this folder in VS Code and press F5