]> gitweb.factorcode.org Git - factor.git/blob - extra/wipe/wipe-docs.factor
9b27e1f8f74bc52816481abb88008f562c5b2f2a
[factor.git] / extra / wipe / wipe-docs.factor
1 ! Copyright (C) 2018 Alexander Ilin.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax kernel quotations ;
4 IN: wipe
5
6 HELP: overwrite-with-random-bytes
7 { $values { "file-name" "a filename string" } }
8 { $description "Overwrite the " { $snippet "file-name" } " contents with random data. The slack space at the end is not overwritten." } ;
9
10 ABOUT: "Wipe"
11
12 ARTICLE: "Wipe" "Wipe"
13 "The " { $vocab-link "wipe" } " vocab provides some words for securely erasing (wiping) individual files, entire folders or the free space on a drive:"
14 { $subsections wipe wipe-all wipe-file wipe-free-space }
15 ;
16
17 HELP: wipe
18 { $values { "path" "a pathname string" } }
19 { $description "Call either " { $link wipe-file } " if the " { $snippet "path" } " is a file, or " { $link wipe-all } " if " { $snippet "path" } " is a directory." } ;
20
21 HELP: wipe-all
22 { $values { "directory" "a pathname string" } }
23 { $description "Wipe all files in the " { $snippet "directory" } " and all subdirectories by overwriting their contents with random data and then deleting them." } ;
24
25 HELP: wipe-file
26 { $values { "file-name" "a filename string" } }
27 { $description "Wipe the " { $snippet "file-name" } " by overwriting its contents with random data and then deleting it." } ;
28
29 HELP: wipe-free-space
30 { $values { "path" "a pathname string" } }
31 { $description "Create a temporary file at " { $snippet "path" } " that consumes all of free space on the drive, fill it with random data, then delete the file. This has the effect of wiping any recoverable data left on the drive after insecurely deleting the files." } ;
32
33 HELP: with-temp-directory-at
34 { $values { "path" "a filename string" } { "quot" quotation } }
35 { $description "Run the " { $snippet "quot" } "ation in a randomly named subdirectory of " { $snippet "path" } ", then delete the subdirectory." } ;
36
37 HELP: make-file-empty
38 { $values { "file-name" "a filename string" } }
39 { $description "Create a new empty file named " { $snippet "file-name" } ", discarding any existing data under that name." } ;