Package chemaxon.util
Class DotfileUtil
java.lang.Object
chemaxon.util.DotfileUtil
Utility class for configuration file handling.
- Since:
- Marvin 3.0, 12/16/2002
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic OutputStream
Opens a dotfile for writing.static File
Gets the directory of the configuration files.static String
Gets the subdirectory name of the configuration files.static File
getDotFile
(String relpath) Gets a configuration file with the specified relative path.static File
getDotFileWithEnsuredPath
(String relpath) static long
Gets the last modification time for a dotfile.static InputStream
Opens a dotfile for reading.static void
Sets the subdirectory name for the configuration files.
-
Constructor Details
-
DotfileUtil
public DotfileUtil()
-
-
Method Details
-
getDotDir
Gets the directory of the configuration files.- Returns:
- the directory
-
getDotFile
Gets a configuration file with the specified relative path. The specified relative path must be in unix style, with slash ("/") characters as file separator.- Parameters:
relpath
- relative path- Returns:
- the file
- See Also:
-
getDotFileWithEnsuredPath
- Throws:
IOException
-
create
Opens a dotfile for writing. Creates directory if it does not exist. The specified relative path must be in unix style, with slash ("/") characters as file separator.- Parameters:
f
- the dotfile- Returns:
- the output stream
- Throws:
IOException
- cannot create directory or file
-
open
Opens a dotfile for reading. The specified relative path must be in unix style, with slash ("/") characters as file separator.- Parameters:
f
- the dotfile- Returns:
- the output stream
- Throws:
IOException
- cannot create directory or file
-
lastModified
Gets the last modification time for a dotfile.- Parameters:
f
- the dotfile- Returns:
- the last modification time
-
getDotDirName
Gets the subdirectory name of the configuration files.- Returns:
- the directory name
-
setDotDirName
Sets the subdirectory name for the configuration files. The specified relative path must be in unix style, with slash ("/") characters as file separator.- Parameters:
d
- the subdirectory name
-