CliSite/commands/overwrite.ts

15 lines
395 B
TypeScript
Raw Permalink Normal View History

2022-06-12 09:38:38 +02:00
function overwrite(args:Array<string>, curdir:any){
var buf = "";
if (args.length == 0) {
buf += "overwrite: missing operand\n";
}
else {
curdir[args[0]] = "";
for (let i = 1; i < args.length; i++) {
curdir[args[0]] += args[i] + " ";
}
buf += "File " + args[0] + " overwritten\n";
}
return buf;
}
export { overwrite };