public class FilePropertyIOFactory extends Object
Constructor and Description |
---|
FilePropertyIOFactory() |
Modifier and Type | Method and Description |
---|---|
static FilePropertyIO |
createFilePropertyIO(File rootDirectory,
String propertyFilename,
boolean readonly,
boolean cached)
Searches for the propertyFilename in directory or sub directory of rootDirectory, and returns a FilePropertyIO.
|
static File |
findPropertyFile(File rootDirectory,
String propertyFilename)
Searching for a file with name propertyFilename in the root directory or in one of its sub directories.
|
static File[] |
findPropertyFiles(File rootDirectory)
Find all the properties files in the root directory or in one of its sub directories.
|
static File[] |
findPropertyFiles(File rootDirectory,
String filename)
Find all the properties files with a certain name in the root directory or in one of its sub directories.
|
public static FilePropertyIO createFilePropertyIO(File rootDirectory, String propertyFilename, boolean readonly, boolean cached) throws PropertyIOException
rootDirectory
- the directory to start the search.propertyFilename
- the property filename to search for.readonly
- if the FilePropertyIO
be read only.cached
- shall the values be cached in the PropertyIO
's.PropertyIOException
- if a file with filename propertyFilename is not found.public static File findPropertyFile(File rootDirectory, String propertyFilename)
rootDirectory
- the root directory to start the search in.propertyFilename
- the filename to search for, not case sensitive. Not a filter name, but the complete filename.File
found with that name, otherwise null
is returned.public static File[] findPropertyFiles(File rootDirectory)
rootDirectory
- the directory to start the search in.public static File[] findPropertyFiles(File rootDirectory, String filename)
rootDirectory
- the directory to start the search in.filename
- the name of the file you are searching for, can be a filter.WildCardFilenameFilter