- public class ConfigLocation¶
Defines a MOTECH configuration location. If the given location starts with a leading file separator character, the location is treated as a file system directory. Otherwise, it is treated as a classpath location.
- public File getFile(String fileName, FileAccessType accessType)¶
This method Returns the java.io.File object for the given file name relative to the config location. It also checks for the requested file accessibility. If the requested access type check is ConfigLocation.FileAccessType.READABLE, the file’s existence and readability will be checked. Similarly, if the requested access type check is ConfigLocation.FileAccessType.WRITABLE, then the write accessibility to the file will be checked. If the file does not exists, write accessibility of its ancestors will be checked.
- MotechConfigurationException – if the file is not readable or writable depending on the given access type.
File relative to the config location.