Esempio n. 1
0
 public static void createDirectories() {
   final String[] dirs = {
     Paths.getHomeDirectory(),
     Paths.getLogsDirectory(),
     Paths.getCacheDirectory(),
     Paths.getSettingsDirectory(),
     Paths.getScriptsDirectory(),
     Paths.getScriptsSourcesDirectory(),
     Paths.getScriptsPrecompiledDirectory(),
     Paths.getScriptsNetworkDirectory(),
   };
   for (final String name : dirs) {
     final File dir = new File(name);
     if (!dir.isDirectory()) {
       dir.mkdirs();
     }
   }
   if (Configuration.getCurrentOperatingSystem() == Configuration.OperatingSystem.WINDOWS) {
     try {
       Runtime.getRuntime()
           .exec(
               "attrib +H \""
                   + new File(Paths.getScriptsNetworkDirectory()).getAbsolutePath()
                   + "\"");
     } catch (final IOException ignored) {
     }
   }
 }
Esempio n. 2
0
 public static String getSettingsDirectory() {
   return Paths.getHomeDirectory() + File.separator + "Settings";
 }
Esempio n. 3
0
 public static String getScriptsDirectory() {
   return Paths.getHomeDirectory() + File.separator + Paths.SCRIPTS_NAME_OUT;
 }
Esempio n. 4
0
 public static String getCacheDirectory() {
   return Paths.getHomeDirectory() + File.separator + "Cache";
 }
Esempio n. 5
0
 public static String getScreenshotsDirectory() {
   return Paths.getHomeDirectory() + File.separator + "Screenshots";
 }