0.1.7 • Published 7 months ago

@rustraf/core v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

@rustraf/core

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

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

PackageSpeed
rimraf1.61s user 11.26s system 218% cpu 5.899 total
@rustraf/core0.28s user 5.79s system 84% cpu 7.218 total
native(darwin-arm64)0.06s user 5.38s system 86% cpu 6.293 total
0.1.7

7 months ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago