* Asynchronously removes a file or symbolic link. * @param {string | Buffer | URL} path * @param {(err?: Error) => any} callback * @returns {void}
(path, callback)
| 2311 | * @returns {void} |
| 2312 | */ |
| 2313 | function unlink(path, callback) { |
| 2314 | const h = vfsState.handlers; |
| 2315 | if (h !== null && vfsVoid(h.unlink(path), callback)) return; |
| 2316 | |
| 2317 | callback = makeCallback(callback); |
| 2318 | const req = new FSReqCallback(); |
| 2319 | req.oncomplete = callback; |
| 2320 | binding.unlink(getValidatedPath(path), req); |
| 2321 | } |
| 2322 | |
| 2323 | /** |
| 2324 | * Synchronously removes a file or symbolic link. |
no test coverage detected
searching dependent graphs…