CHModTool.java
Go to the documentation of this file.
00001 package org.best_of_robotics.transform.ros.to.cplusplus.tools;
00002 
00003 import java.io.IOException;
00004 
00005 import org.eclipse.epsilon.eol.tools.AbstractTool;
00006 
00007 public class CHModTool extends AbstractTool {
00008   
00009   protected String filename;
00010   protected String directory;
00011   
00012   public void setName(String filename) {
00013     this.filename = filename;
00014   }
00015   
00016   public String getFileName() {
00017     return filename;
00018   }
00019   
00020   public void setDirectory(String directory) {
00021             this.directory = directory.replace("file:", "");
00022           }
00023           
00024           public String getDirectory() {
00025             return directory;
00026           }
00027   
00028   public void chmod(String rights)
00029   {
00030           System.out.println("Running: " + "chmod " + rights + " " + directory + "/cfg/" + filename + ".cfg");
00031           try {
00032                         Runtime.getRuntime().exec("chmod " + rights + " " + directory + "/cfg/" + filename + ".cfg");
00033                 } catch (IOException e) {
00034                         e.printStackTrace();
00035                 } 
00036   }
00037   
00038   public void chmod2(String rights)
00039   {
00040           try {
00041                         Runtime.getRuntime().exec("chmod " + rights + " " + directory + "/src/" + filename);
00042                 } catch (IOException e) {
00043                         e.printStackTrace();
00044                 } 
00045   }
00046           
00047   
00048 }


bride_plugin_source
Author(s): Alexander Bubeck
autogenerated on Sun Oct 5 2014 22:38:34