
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@vscode-utility/fs-browserify
Advanced tools
When developing vscode extensions, it is essential to ensure compatibility between the desktop and web versions of vscode (https://vscode.dev or https://github.dev).
Using @vscode-utility/fs-browserify
, you can access and manipulate files stored locally or remotely, making it easier to develop vscode extensions that work seamlessly on both the desktop and web versions of vscode.
This library utilizes a portion of the File System provided by the VS Code API.
If you find this package useful for your projects, please consider supporting me by Patreon, KO-FI or Paypal. It's a great way to help me maintain and improve this tool in the future. Your support is truly appreciated!
npm
npm install @vscode-utility/fs-browserify
yarn
yarn add @vscode-utility/fs-browserify
pnpm
pnpm add @vscode-utility/fs-browserify
import { fs } from '@vscode-utility/fs-browserify';
// Retrieve file metadata
await fs.statAsync(path);
// Retrieve all directory entries
await fs.readDirectoryAsync(path);
// Create a new directory
await fs.createDirectoryAsync(path);
// Read the full content of a file
await fs.readFileAsync(path, options);
// Reads a JSON file and then parses it into an object.
await fs.readJsonAsync(path, options);
// Append the provided data to a file
await fs.appendFileAsync(path, content);
// Write data to a file and replace its full contents
await fs.writeFileAsync(path, content);
// Writes an object to a JSON file.
await fs.writeJsonAsync(path, content, options);
// Delete a file
await fs.deleteAsync(path, options);
// Rename a file or folder
await fs.renameAsync(source, target, options);
// Copy files or folders
await fs.copyAsync(source, target, options);
// Check if a given path exists or not in the file system
await fs.existAsync(source);
// Truncates the file to change the size of the file i.e either increase or decrease the file size
await fs.existAsync(path, length);
// Check the permissions of a given file
fs.access(path);
@vscode-utility/fs-browserify | fs (node) | fs (vscode api) |
---|---|---|
fs.statAsync () | fs.stat () | fs.stat () |
fs.readDirectoryAsync () | fs.readDir () | fs.readDirectory () |
fs.createDirectoryAsync () | fs.mkdir () | fs.createDirectory () |
fs.readFileAsync () | fs.readFile () | fs.readFile () |
fs.readJsonAsync () | undefined | undefined |
fs.appendFileAsync () | fs.appendFile () | undefined |
fs.writeFileAsync () | fs.writeFile () | fs.writeFile () |
fs.writeJsonAsync () | undefined | undefined |
fs.deleteAsync () | fs.rmdir () | fs.delete () |
fs.renameAsync () | fs.rename () | fs.rename () |
fs.copyAsync () | fs.cp () | fs.copy () |
fs.existAsync () | fs.exist () | undefined |
fs.truncateAsync () | fs.truncate () | undefined |
fs.watch () | fs.watch () | undefined |
fs.access () | fs.access () | undefined |
@vscode-utility/fs-browserify
fs (node)
fs (vscode api)
If you discover a bug, or have a suggestion for a feature request, please submit an issue.
This extension is licensed under the MIT License
1.0.8
FAQs
The `fs` module compatible for VS Code Web Extensions
The npm package @vscode-utility/fs-browserify receives a total of 2 weekly downloads. As such, @vscode-utility/fs-browserify popularity was classified as not popular.
We found that @vscode-utility/fs-browserify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.