All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala_maven.FileUtils Maven / Gradle / Ivy

Go to download

The scala-maven-plugin (previously maven-scala-plugin) is used for compiling/testing/running/documenting scala code of any maven project.

There is a newer version: 4.9.2
Show newest version
package scala_maven;

import java.io.File;

class FileUtils extends org.codehaus.plexus.util.FileUtils {
  
  /**
   * @param canonical Should use CanonicalPath to normalize path (true => getCanonicalPath, false => getAbsolutePath)
   * @see https://github.com/davidB/maven-scala-plugin/issues/50
   */
  public static String pathOf(File f, boolean canonical) throws Exception {
    return canonical? f.getCanonicalPath() : f.getAbsolutePath();
  }

  /**
   * @param canonical Should use CanonicalPath to normalize path (true => getCanonicalPath, false => getAbsolutePath)
   * @see https://github.com/davidB/maven-scala-plugin/issues/50
   */
  public static File fileOf(File f, boolean canonical) throws Exception {
    return canonical? f.getCanonicalFile() : f.getAbsoluteFile();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy