Class Files
- java.lang.Object
-
- org.gcube.application.geoportal.common.utils.Files
-
public class Files extends Object
-
-
Constructor Summary
Constructors Constructor Description Files()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<String,List<File>>clusterizeFilesByExtension(File base, String extension, Boolean recursive)static FiledownloadFromUrl(String name, String url)static StringfixFilename(String toFix)static Map<String,List<File>>getAllShapeSet(File baseFolder, boolean recursive)static FilegetFileFromResources(String fileName)static StringgetName(String path)static List<File>getSiblings(File location, String baseName)static StringreadFileAsString(String path, Charset encoding)static voidsaveString(String content, Path dest)
-
-
-
Method Detail
-
getAllShapeSet
public static Map<String,List<File>> getAllShapeSet(File baseFolder, boolean recursive) throws IOException
- Throws:
IOException
-
clusterizeFilesByExtension
public static Map<String,List<File>> clusterizeFilesByExtension(File base, String extension, Boolean recursive) throws IOException
- Throws:
IOException
-
readFileAsString
public static String readFileAsString(String path, Charset encoding) throws IOException
- Throws:
IOException
-
downloadFromUrl
public static final File downloadFromUrl(String name, String url) throws IOException
- Throws:
IOException
-
saveString
public static final void saveString(String content, Path dest) throws IOException
- Throws:
IOException
-
-