Package org.jline.builtins
Class ConfigurationPath
- java.lang.Object
-
- org.jline.builtins.ConfigurationPath
-
public class ConfigurationPath extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.file.PathappConfigprivate java.nio.file.PathuserConfig
-
Constructor Summary
Constructors Constructor Description ConfigurationPath(java.nio.file.Path appConfig, java.nio.file.Path userConfig)Configuration class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.PathgetConfig(java.lang.String name)Search configuration file first from userConfig and then appConfig directory.java.nio.file.PathgetUserConfig(java.lang.String name)Search configuration file from userConfig directory.java.nio.file.PathgetUserConfig(java.lang.String name, boolean create)Search configuration file from userConfig directory.
-
-
-
Method Detail
-
getConfig
public java.nio.file.Path getConfig(java.lang.String name)
Search configuration file first from userConfig and then appConfig directory. Returns null if file is not found.- Parameters:
name- Configuration file name.- Returns:
- Configuration file.
-
getUserConfig
public java.nio.file.Path getUserConfig(java.lang.String name) throws java.io.IOExceptionSearch configuration file from userConfig directory. Returns null if file is not found.- Parameters:
name- Configuration file name.- Returns:
- Configuration file.
- Throws:
java.io.IOException- When we do not have read access to the file or directory.
-
getUserConfig
public java.nio.file.Path getUserConfig(java.lang.String name, boolean create) throws java.io.IOExceptionSearch configuration file from userConfig directory. Returns null if file is not found.- Parameters:
name- Configuration file namecreate- When true configuration file is created if not found.- Returns:
- Configuration file.
- Throws:
java.io.IOException- When we do not have read/write access to the file or directory.
-
-