CliSite/commands/touch.ts

13 lines
342 B
TypeScript
Raw Permalink Normal View History

2022-06-12 09:38:38 +02:00
import {Socket} from 'socket.io';
function touch(args:Array<string>, curdir:any, socket:Socket):string {
var buf = "";
if (args.length == 0) {
buf += "touch: missing operand\n";
}
else {
curdir[socket.id][args[0]] = "";
buf += "File " + args[0] + " created\n";
}
return buf;
}
export { touch };