1 package net.sf.tomp.xtcl.command;
2
3 import net.sf.tomp.xtcl.Context;
4
5 /***
6 * Creates a File and puts it as variable to Context
7 *
8 * @author tomp
9 */
10 public class Fil extends FileCommand {
11 /***
12 * Creates a File and puts it as variable to Context.
13 *
14 * @param context Context
15 * @return 0
16 * @throws Exception if file creation fails
17 */
18 public int execute(Context context) throws Exception {
19
20 context.put(var, context.getFile(fileName));
21
22 return done(context, 0);
23 }
24
25 /***
26 *
27 * @return "FILE " + var + "=" + fileName;
28 */
29 public String toString() {
30 return "FILE " + var + "=" + fileName;
31 }
32 }
33
34
35
36
37
38
39
40
41
42
43