/** * Returns the directory containing the configuration files. * If the directory does not exist, it will be created automatically. * * @return a File that is the directory containing configuration files */ public static File getConfigDir() { return createDir(new File(cwd, "/config")); }
/** * Returns the directory containing the battle files. * * @return a File that is the directory containing the battle files */ public static File getBattlesDir() { return createDir(new File(cwd, "/battles")); }
/** * Returns the directory containing the screen shot files. * If the directory does not exist, it will be created automatically. * * @return a File that is the directory containing screen shot files */ public static File getScreenshotsDir() { return createDir(new File(cwd, "/screenshots")); }
/** * Returns the editor theme directory. * * @return a File that is the directory containing the editor theme files. */ public static File getEditorThemeConfigDir() { return createDir(new File(cwd, "/theme/editor")); }
/** * Returns the directory containing the robots. * * @return a File that is the directory containing the robots */ public static File getRobotsDir() { String robotPath = System.getProperty("ROBOTPATH"); File file; if (robotPath != null) { file = new File(robotPath); } else { file = new File(cwd, "/robots"); } return createDir(file); }
/** * Returns the directory containing data files of robots. * * @return a File that is the directory containing the robot data. */ public static File getRobotsDataDir() { return createDir(new File(getRobotsDir(), "/.data/")); }
public static void clean() { File roborumbleTempFile = new File("roborumble/temp"); deleteFile(roborumbleTempFile.getPath()); deleteFile(FileUtil.getRobotsDataDir().getPath()); deleteFile(FileUtil.getRobotDatabaseFile().getPath()); FileUtil.createDir(roborumbleTempFile); final IRepositoryManager repositoryManager = Container.getComponent(IRepositoryManager.class); repositoryManager.reload(true); Logger.logMessage("Cleaning done."); }
FileUtil.createDir(screenshotDir);