Codota Logo
SkeletonUtil.getTempGeneratePath
Code IndexAdd Codota to your IDE (free)

How to use
getTempGeneratePath
method
in
cn.springcloud.codegen.engine.util.SkeletonUtil

Best Java code snippets using cn.springcloud.codegen.engine.util.SkeletonUtil.getTempGeneratePath (Showing top 1 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: SpringCloud/spring-cloud-codegen

public byte[] download(String generatePath, String fileName, SkeletonProperties skeletonProperties) {
  if (StringUtils.isEmpty(generatePath)) {
    generatePath = SkeletonUtil.getTempGeneratePath();
  }
  if (StringUtils.isEmpty(fileName)) {
    throw new SkeletonException("File name is null or empty");
  }
  try {
    String canonicalPath = SkeletonUtil.getCanonicalPath(generatePath, fileName, skeletonProperties);
    generate(canonicalPath, skeletonProperties);
    String zipFilePath = ZipUtil.zip(canonicalPath, null);
    File zipFile = new File(zipFilePath);
    LOG.info("Download skeleton file for " + zipFile.getName() + " is executed");
    return FileUtil.getBytes(zipFile);
  } catch (Exception e) {
    throw new SkeletonException(e.getMessage(), e);
  } finally {
    File directory = new File(generatePath);
    FileUtil.forceDeleteDirectory(directory, 5);
  }
}
cn.springcloud.codegen.engine.utilSkeletonUtilgetTempGeneratePath

Popular methods of SkeletonUtil

  • getBasePackagePath
  • formatGeneratePath
  • formatProjectName
  • getBaseDirectoryName
  • getCanonicalFileName
  • getCanonicalPath
  • getOutputPath

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ArrayList (java.util)
    Resizable-array implementation of the List interface. Implements all optional list operations, and p
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now