[Swift-user] would rm be a valid app?

Neil Best nbest at ci.uchicago.edu
Thu Jan 17 11:04:21 CST 2013


I wanted to use Swift to clean up files that are no longer needed.  It
seemed natural to define rm as an app then script this:

type file;

string oldGrbFiles[] = readData( "data/oldGrbFiles.txt");

file grb[]<array_mapper; files=oldGrbFiles>;

app rm (file f) {
  rm @f;
}

foreach g in grb {
  rm( g);
}


Swift runs happily and tasks complete but the number of files in the
subfolder that I am trying to clean out does not change.  I suspect
that what is being rm-ed are the Swift-ified copies of the mapped
input files.  I simply want a distributed "make clean".  Is this
feasible?



More information about the Swift-user mailing list