The code in DelDirs.fth allows you to delete directories recursively. By deleting from the root directory, the whole disk can be erased.
: entValid? \ -- flag
Are we at a valid directory entry? In terms of DOS attributes,
we only reject smudged entries and volume labels.
: entNext \ -- flag
Step to the next valid directory entry. Return zero
at the end of the directory, otherwise non-zero.
: toEnt \ --
Skip to first valid entry.
: thisDir? \ -- flag
Return true if name is '.'
: delFileEnt \ --
Delete the current directory entry, which must be
for a file.
: delDirEnt \ --
Delete the current directory entry, which must be
for a directory.
: delEntry \ --
Delete the current directory entry.
: delCurrDir \ --
Delete all the files and directories in the current directory.
: delDisk \ --
Delete all the files on the disk
: _$rmd \ caddr len -- ior
Delete a directory and its contents. Unprotected.
: $rmd \ caddr len -- ior
Delete a directory and its contents. Protected.
: cd+ \ caddr len -- ior
Open new directory. CD+ changes the directory up or down
a level.