1 ! Copyright (C) 2018 Alexander Ilin.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax kernel quotations ;
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." } ;
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 }
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." } ;
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." } ;
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." } ;
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." } ;
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." } ;
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." } ;