@rustraf/core
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

@rustraf/core

The UNIX command rm -rf for node written with Rust.

Npm verssion GitHub tag (latest by date) Npm downloads Npm downloads

API

import { remove, removeFile, removeDir } from "@rustraf/core";

remove(fileOrFolder)

Remove a folder or a file, the same behaviour as 'rm -rf fileOrFolder' It will remove empty directories that lack read access on Linux, and will remove "read-only" files and directories on Windows.

removeFile(file)

Remove a file.

removeDir(dir)

Remove a folder and all it's underlying content.

CLI

If installed with

npm install @rustraf/core -g
yarn global add @rustraf/core

it can be used as a global command rustraf <path> [<path> ...] which is useful for cross platform support.

Compared with rimraf

Removing node_modules with a size of 597,5 MB

Package Speed
rimraf 1.61s user 11.26s system 218% cpu 5.899 total
@rustraf/core 0.28s user 5.79s system 84% cpu 7.218 total
native(darwin-arm64) 0.06s user 5.38s system 86% cpu 6.293 total

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.84latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.84
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00
0.0.120
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70

Package Sidebar

Install

npm i @rustraf/core

Weekly Downloads

4

Version

0.1.8

License

MIT

Unpacked Size

15 kB

Total Files

7

Last publish

Collaborators

  • stijnvanhulle