fullRuntime/src/sc/util/FileUtil.java
public static boolean unzip(String zipFile, String resName, boolean overwrite) {
      if (!overwrite && new File(resName).exists()) {
         System.err.println("*** unzip failed because overwrite is false and " + resName + " exists");
         return false;
      }
      String zipRes = overwrite ? exec(null, null, true, "unzip", "-o", zipFile, "-d", resName) : exec(null, null, true, "unzip", zipFile, "-d", resName);
      if (zipRes == null) {
         System.err.println("*** zip failed");
         return false;
      }
      return true;
   }
/**
    * Warning - this method will just hang if there are files that need to be overwritten.  You can pass in "overwrite=true" to fix this but it's
    * best to rename the existing directory.
    */
this method will just hang if there are files that need to be overwritten.  You can pass in "overwrite=true" to fix this but it's
best to rename the existing directory.
this method will just hang if there are files that need to be overwritten . You can pass in " overwrite = true " to fix this but it ' s best to rename the existing directory .
public static boolean unzip(String zipFile, String resName, boolean overwrite) {
      if (!overwrite && new File(resName).exists()) {
         System.err.println("*** unzip failed because overwrite is false and " + resName + " exists");
         return false;
      }
      String zipRes = overwrite ? exec(null, null, true, "unzip", "-o", zipFile, "-d", resName) : exec(null, null, true, "unzip", zipFile, "-d", resName);
      if (zipRes == null) {
         System.err.println("*** zip failed");
         return false;
      }
      return true;
   }
public static boolean unzip ( String zipFile , String resName , boolean overwrite ) { if ( ! overwrite && new File ( resName ) . exists ( ) ) { System . err . println ( "*** unzip failed because overwrite is false and " + resName + " exists" ) ; return false ; } String zipRes = overwrite ? exec ( null , null , true , "unzip" , "-o" , zipFile , "-d" , resName ) : exec ( null , null , true , "unzip" , zipFile , "-d" , resName ) ; if ( zipRes == null ) { System . err . println ( "*** zip failed" ) ; return false ; } return true ; }
Warning - this method will just hang if there are files that need to be overwritten.
Warning - this method will just hang if there are files that need to be overwritten .