
org.opengis.cite.geotiff11.util.DirectoryUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ets-geotiff11 Show documentation
Show all versions of ets-geotiff11 Show documentation
Describe purpose of test suite.
The newest version!
package org.opengis.cite.geotiff11.util;
import java.io.File;
import java.net.URISyntaxException;
import java.nio.file.Paths;
/**
*
* DirectoryUtil class.
*
*
*/
public class DirectoryUtil {
/**
*
* getDirectory.
*
* @return a {@link java.lang.String} object
*/
public static String getDirectory() {
try {
return Paths
.get(new File(DirectoryUtil.class.getProtectionDomain().getCodeSource().getLocation().toURI())
.getPath(), "../..")
.toString();
}
catch (URISyntaxException e) {
e.printStackTrace();
return System.getProperty("user.dir");
}
}
/**
*
* getDirectory.
*
* @param local a {@link java.lang.String} object
* @return a {@link java.lang.String} object
*/
public static String getDirectory(String local) {
return Paths.get(getDirectory(), local).toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy