public final class SrcFileLoader extends Object implements FileLoader
| Constructor and Description |
|---|
SrcFileLoader()
Default constructor.
|
SrcFileLoader(Config config)
Constructor with configuration.
|
SrcFileLoader(String configPathAndFilename)
Constructor with configuration path and filename.
|
SrcFileLoader(URL configFileURL)
Constructor with URL.
|
| Modifier and Type | Method and Description |
|---|---|
void |
deleteFile(String path,
String filename)
Delete a file in the given directory.
|
void |
deletePath(String path)
Delete all files in the given directory.
|
Config |
getConfig()
Returns the configuration.
|
File |
loadFile(String path,
String filename)
Loads a file from a source into a local directory.If the file is already
up to date nothing will be copied.
|
File |
loadFile(String path,
String filename,
org.fuin.utils4swing.progress.FileCopyProgressListener listener)
Loads a file from a source into a local directory.If the file is already
up to date nothing will be copied.
|
public SrcFileLoader()
throws InvalidConfigException
InvalidConfigException - Cannot read the configuration XML file.public SrcFileLoader(String configPathAndFilename) throws InvalidConfigException
configPathAndFilename - Path and filename of XML configuration.InvalidConfigException - Cannot read the configuration XML file.public SrcFileLoader(URL configFileURL) throws InvalidConfigException
configFileURL - URL of the configuration file.InvalidConfigException - Error reading the file.public SrcFileLoader(Config config)
config - Configuration.public final Config getConfig()
public File loadFile(String path, String filename) throws LoadingFileException
loadFile in interface FileLoaderpath - Path inside the current directory.filename - Filename (without path).LoadingFileException - Loading the file failed for some reason.public File loadFile(String path, String filename, org.fuin.utils4swing.progress.FileCopyProgressListener listener) throws LoadingFileException
loadFile in interface FileLoaderpath - Path inside the current directory.filename - Filename (without path).listener - Listener to inform about progress - Can be null
if no progress information is needed.LoadingFileException - Loading the file failed for some reason.public final void deleteFile(String path, String filename) throws DeleteException
deleteFile in interface FileLoaderpath - Path inside the current directory - Cannot be
null but may be empty.filename - Filename (without path) - Cannot be null or emptyDeleteException - There was a problem deleting the file.public final void deletePath(String path) throws DeleteException
deletePath in interface FileLoaderpath - Path inside the current directory - Cannot be
null or empty (it's not allowed to delete the
base directory!=.DeleteException - There was a problem deleting the files.Copyright © 2013 Future Invent Informationsmanagement GmbH, Hamburg (Germany). All Rights Reserved.