MCPcopy Create free account
hub / github.com/nodejs/node / unlink

Function unlink

lib/internal/fs/promises.js:1851–1862  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

1849}
1850
1851async function unlink(path) {
1852 const h = vfsState.handlers;
1853 if (h !== null) {
1854 const promise = h.unlink(path);
1855 if (promise !== undefined) { await promise; return; }
1856 }
1857 return await PromisePrototypeThen(
1858 binding.unlink(getValidatedPath(path), kUsePromises),
1859 undefined,
1860 handleErrorFromBinding,
1861 );
1862}
1863
1864async function fchmod(handle, mode) {
1865 if (permission.isEnabled()) {

Callers 5

_rimrafFunction · 0.70
fixWinEPERMFunction · 0.70
mayCopyFileFunction · 0.50
copyLinkFunction · 0.50

Calls 1

unlinkMethod · 0.45

Tested by

no test coverage detected