property TarLimitCreatedFiles {
requires TrackCreatedFiles, RecordArgs, FileNames;
check RFileSystem.openCreate (file: RFile) {
if (RSystem.commandArgsContains ("-c")) {
if (createdFiles > 1) {
violation ("File create limit reached. " +
"Attempt to create more than 1 file. " +
"Creating " + file.getName () + ".");
}
} else if (!RSystem.commandArgsContains ("-x")) {
violation ("Attempt to create a new file: " + file.getName ());
}
}
}
Naccio Home Page
University of Virginia, Computer Science