MCPcopy Create free account
hub / github.com/vitest-dev/vitest / removeFile

Function removeFile

packages/browser/src/node/commands/fs.ts:35–40  ·  view source on GitHub ↗
({ project }, path)

Source from the content-addressed store, hash-verified

33export const removeFile: BrowserCommand<
34 Parameters<BrowserCommands['removeFile']>
35> = async ({ project }, path) => {
36 assertBrowserApiWrite(project, path)
37 const filepath = resolve(project.config.root, path)
38 assertBrowserFileAccess(project, filepath)
39 await fsp.rm(filepath)
40}
41
42export const _fileInfo: BrowserCommand<[path: string, encoding: BufferEncoding]> = async ({ project }, path, encoding) => {
43 const filepath = resolve(project.config.root, path)

Callers 1

commands.test.tsFile · 0.85

Calls 3

assertBrowserApiWriteFunction · 0.90
assertBrowserFileAccessFunction · 0.90
resolveFunction · 0.50

Tested by

no test coverage detected