1 package net.sf.tomp.xtcl.command;
2
3 import net.sf.tomp.xtcl.Context;
4
5 import java.io.PrintStream;
6
7 /***
8 * DOCUMENT ME!
9 *
10 * @author tomp
11 */
12 public class Fil extends FileCommand {
13 /***
14 * DOCUMENT ME!
15 *
16 * @param context DOCUMENT ME!
17 * @return DOCUMENT ME!
18 * @throws Exception DOCUMENT ME!
19 */
20 public int execute(Context context) throws Exception {
21 PrintStream out = context.getOut();
22
23 context.put(var, context.getFile(fileName));
24
25 if (out != null) {
26 out.print("OK " + this);
27 }
28
29 return 0;
30 }
31
32 /***
33 * DOCUMENT ME!
34 *
35 * @return DOCUMENT ME!
36 */
37 public String toString() {
38 return "FILE " + var + "=" + fileName;
39 }
40 }
41
42
43
44
45
46
47
48
49
50
51