13 lines
342 B
TypeScript
13 lines
342 B
TypeScript
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 }; |