+ /** Creates an outputstream for the output/err files. */
+ protected OutputStream createOutputStream(Resource target) {
+ FileOutputStream out = null;
+ try {
+
+ final File file;
+ if (executionResources != null)
+ file = new File(executionResources.getAsOsPath(target, true));
+ else
+ file = target.getFile();
+ out = new FileOutputStream(file, false);
+ } catch (IOException e) {
+ log.error("Cannot get file for " + target, e);
+ IOUtils.closeQuietly(out);
+ }
+ return out;
+ }
+
+ /** Append the argument (for chaining) */
+ public SystemCall arg(String arg) {
+ if (command == null)
+ command = new ArrayList<Object>();
+ command.add(arg);
+ return this;
+ }
+
+ /** Append the argument (for chaining) */
+ public SystemCall arg(String arg, String value) {
+ if (command == null)
+ command = new ArrayList<Object>();
+ command.add(arg);
+ command.add(value);
+ return this;
+ }
+
+ /** */