You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 28, 2019. It is now read-only.
-`method`[\<String\>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) : ID of the method (default: 'secure');
83
-
-`customMethod`[\<Function\>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) : your own method to remove a file (if specified, priority over `method`);
86
+
-`standard`[\<String\>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type) : ID of the standard (default: 'secure');
87
+
-`customStandard`[\<Function\>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) : your own standard to remove a file (if specified, priority over `standard`);
84
88
-`maxBusyTries`[\<Number\>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type) : number of retries if an error occur;
85
89
-`disableGlob`[\<Boolean\>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type) : allow or not file globbing (default: true).
86
90
-`callback`[\<Function\>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function) (if missing, return a promise):
You can invoke the built-in help with `secure-rm -h`:
159
165
@@ -162,24 +168,29 @@ You can invoke the built-in help with `secure-rm -h`:
162
168
CLI help:
163
169
164
170
USAGE
165
-
$ secure-rm PATH
171
+
$ secure-rm PATH
166
172
167
173
OPTIONS
168
-
-f, --force avoid checks
169
-
-h, --help show CLI help
170
-
-m, --method=method [default: secure] select the erasure method
171
-
-r, --retries=retries max retries if error
172
-
-t, --table show the methods table
173
-
-v, --version show CLI version
174
-
--[no-]globbing allow or not file globbing
174
+
-f, --force avoid checks
175
+
-h, --help show CLI help
176
+
-m, --mute mutes the cli to the bare minimum
177
+
-r, --retries=retries [default: 3] max retries if error
178
+
-s, --standard=standard [default: secure] select the erasure standard
179
+
-t, --table show the standards table
180
+
-v, --version show CLI version
181
+
--[no-]globbing allow or not file globbing
175
182
176
183
DESCRIPTION
177
184
Completely erases files by making recovery impossible.
178
185
For extra documentation, go to https://www.npmjs.com/package/secure-rm
186
+
187
+
EXAMPLES
188
+
$ secure-rm ./folder/*.js ./file.js -s gutmann -f
189
+
$ secure-rm /d/code -m
179
190
```
180
191
<!--AUTO GENERATED HELP END-->
181
192
182
-
### Methods
193
+
### Standards
183
194
184
195
<!--AUTO GENERATED METHODS TABLE START-->
185
196
ID | Name | Passes | Description
@@ -188,7 +199,7 @@ ID | Name | Passes | Description
188
199
randomByte | Pseudorandom byte | 1 | Overwriting with a random byte.
189
200
zeroes | Zeroes | 1 | Overwriting with zeroes.
190
201
ones | Ones | 1 | Overwriting with ones.
191
-
secure | **Secure-rm method** | 3 | Pass 1: Overwriting with random data;<br>Pass 2: Renaming the file with random data;<br>Pass 3: Truncating between 25% and 75% of the file.
202
+
secure | **Secure-rm standard** | 3 | Pass 1: Overwriting with random data;<br>Pass 2: Renaming the file with random data;<br>Pass 3: Truncating between 25% and 75% of the file.
192
203
GOST_R50739-95 | Russian State Standard GOST R 50739-95 | 2 | Pass 1: Overwriting with zeroes;<br>Pass 2: Overwriting with random data.
193
204
HMG_IS5 | British HMG Infosec Standard 5 | 3 | Also known as "Air Force System Security Instructions AFSSI-5020",<br>"Standard of the American Department of Defense (DoD 5220.22 M)"<br>"National Computer Security Center NCSC-TG-025 Standard"<br>and "Navy Staff Office Publication NAVSO P-5239-26"<br>Pass 1: Overwriting with zeroes;<br>Pass 2: Overwriting with ones;<br>Pass 3: Overwriting with random data as well as verifying the writing of this data.
194
205
AR380-19 | US Army AR380-19 | 3 | Pass 1: Overwriting with random data;<br>Pass 2: Overwriting with a random byte;<br>Pass 3: Overwriting with the complement of the 2nd pass, and verifying the writing.
@@ -202,7 +213,7 @@ Note: Node ensures that the file is correctly written, checking the writing in t
202
213
203
214
## 🚩 Troubleshooting / Common issues
204
215
205
-
Should works on OS X, Linux, and Windows.
216
+
Should works on OS X, Linux (almost, see below), and Windows. (See build status)
206
217
207
218
### File systems
208
219
@@ -241,13 +252,24 @@ See the [changelog](/CHANGELOG.md) or [releases](https://github.com/oganexon/sec
241
252
242
253
## 📌 TODO
243
254
244
-
- [x] Release of 1.0.0 (stable API)
245
255
- [ ] Implement more tests
246
-
- [] TypeScript
256
+
- [x] TypeScript
247
257
- [ ] Support of 64bit files
248
258
249
259
## 🏗 Contributing
250
260
261
+
<p align="center">
262
+
<a href="https://jestjs.io"><img src="https://img.shields.io/badge/tested_with-jest-99424f.svg?style=for-the-badge&logo=jest" alt="Tested with Jest"></a>
0 commit comments