// Intended to be run from volume 0 for checking compiled sizes.

switch to 0.
cleanHere().

function cleanDir {
  parameter dir.

  print "Entering '" + dir + "'.".
  cd(dir).
  cleanHere().
  cd("..").
  print "Leaving '" + dir + "'.".
}

function cleanHere {
  local fileList is list().
  list files in fileList.

  for f in fileList {
    if f:ISFILE {
      if f:EXTENSION = "ksm" {
	print "Deleting '" + f:NAME + "'.".
	deletepath(f).
      }
    } else if f:NAME[0] <> "." {
      cleanDir(f).
    }
  }
}

  // TODO: might be neat to actually do a filesize comparison and print a report or something,
  // specifically iterating files NOT to compile.
  // TODO: We could hypothetically even integrate this with the bootstrapper.