Package org.restheart.mongodb.utils
Class FileUtils
- java.lang.Object
-
- org.restheart.mongodb.utils.FileUtils
-
public class FileUtils extends Object
- Author:
- Andrea Di Cesare <andrea@softinstigate.com>
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcreatePidFile(Path pidFile)static Set<Map.Entry<Object,Object>>findManifestInfo()static MongoServiceConfigurationgetConfiguration(String[] args)static MongoServiceConfigurationgetConfiguration(String[] args, boolean silent)static MongoServiceConfigurationgetConfiguration(Path configurationFilePath, Path propsFilePath, boolean silent)static PathgetConfigurationFilePath(String[] args)static PathgetFileAbsolutePath(String path)static intgetFileAbsolutePathHash(Path confFilePath, Path propFilePath)static PathgetPidFilePath(int configurationFileHash)static intgetPidFromFile(Path pidFile)static PathgetPropertiesFilePath(String[] args)static PathgetTmpDirPath()
-
-
-
Method Detail
-
getFileAbsolutePath
public static Path getFileAbsolutePath(String path)
- Parameters:
path-- Returns:
-
getFileAbsolutePathHash
public static int getFileAbsolutePathHash(Path confFilePath, Path propFilePath)
- Parameters:
confFilePath-propFilePath-- Returns:
-
getConfiguration
public static MongoServiceConfiguration getConfiguration(String[] args) throws ConfigurationException
- Parameters:
args-- Returns:
- Throws:
ConfigurationException
-
getConfiguration
public static MongoServiceConfiguration getConfiguration(String[] args, boolean silent) throws ConfigurationException
- Parameters:
args-silent-- Returns:
- Throws:
ConfigurationException
-
getConfiguration
public static MongoServiceConfiguration getConfiguration(Path configurationFilePath, Path propsFilePath, boolean silent) throws ConfigurationException
- Parameters:
configurationFilePath-propsFilePath-silent-- Returns:
- Throws:
ConfigurationException
-
getConfigurationFilePath
public static Path getConfigurationFilePath(String[] args)
- Parameters:
args-- Returns:
-
getPropertiesFilePath
public static Path getPropertiesFilePath(String[] args)
- Parameters:
args-- Returns:
-
getTmpDirPath
public static Path getTmpDirPath()
- Returns:
-
getPidFilePath
public static Path getPidFilePath(int configurationFileHash)
- Parameters:
configurationFileHash-- Returns:
-
createPidFile
public static void createPidFile(Path pidFile)
- Parameters:
pidFile-
-
getPidFromFile
public static int getPidFromFile(Path pidFile)
- Parameters:
pidFile-- Returns:
-
-