Class Utils


  • public class Utils
    extends Object
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • deployZipFile

        public static void deployZipFile​(File zipFileLocation,
                                         File targetLocation)
                                  throws org.wso2.carbon.CarbonException
        Deprecated.
        Inputs provided to this method are not validated. Therefore, this method is deprecated and will be removed in a future release.
        For a given Zip file, process each entry.
        Parameters:
        zipFileLocation - zipFileLocation
        targetLocation - targetLocation
        Throws:
        org.wso2.carbon.core.CarbonException - CarbonException
        org.wso2.carbon.CarbonException
      • deleteDir

        public static boolean deleteDir​(File dir)
        Deletes all files and subdirectories under dir. Returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and returns false.
        Parameters:
        dir - directory to delete
        Returns:
        status
      • getWebContextName

        public static String getWebContextName()
        Read context name from carbon.xml "carbon" will be the default value
        Returns:
        webcontext name