org.gcube.vremanagement.softwaregateway.impl.repositorymanager.maven
Class FileUtilsExtended
java.lang.Object
org.gcube.vremanagement.softwaregateway.impl.repositorymanager.maven.FileUtilsExtended
public class FileUtilsExtended
- extends Object
- Author:
- Luca Frosini (ISTI-CNR)
|
Field Summary |
protected static org.gcube.common.core.utils.logging.GCUBELog |
logger
Class logger. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.gcube.common.core.utils.logging.GCUBELog logger
- Class logger.
FileUtilsExtended
public FileUtilsExtended()
recursiveDeleteDirectory
public static boolean recursiveDeleteDirectory(File directory)
- Remove Recursively a directory
- Parameters:
directory - to remove
- Returns:
- true is the directory is successully removed
stringToFile
public static void stringToFile(String str,
File targetFile)
throws IOException
- Parameters:
str - stringtargetFile - Target File
- Throws:
IOException - if fails
fileToString
public static String fileToString(String absolutePath)
throws Exception
- Parameters:
absolutePath - of the File
- Returns:
- the string representation of the content of the File
- Throws:
Exception - if fails
dateDirectory
public static String dateDirectory()
- Returns:
- string rapresentaton of the name of a directory in the format DD-MM-YYYY
writeXmlToFile
public static void writeXmlToFile(Document document,
File file)
throws Exception
- Parameters:
document - xml documentfile - output file
- Throws:
Exception - if fails
copyFile
public static void copyFile(File source,
File target)
throws Exception
- Copy the source file to the the target file
- Parameters:
source - source filetarget - target file
- Throws:
Exception - if fails
Copyright © 2013. All Rights Reserved.