org.fuin.kickstart4j
Interface FileLoader

All Known Implementing Classes:
SrcFileLoader

public interface FileLoader

Supports loading files from a source location into a local directory.


Method Summary
 void deleteFile(String path, String filename)
          Delete a file in the given directory.
 void deletePath(String path)
          Delete all files in the given directory.
 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.
 

Method Detail

deletePath

void deletePath(String path)
                throws DeleteException
Delete all files in the given directory.

Parameters:
path - Path inside the current directory - Cannot be null or empty (it's not allowed to delete the base directory!=.
Throws:
DeleteException - There was a problem deleting the files.

deleteFile

void deleteFile(String path,
                String filename)
                throws DeleteException
Delete a file in the given directory.

Parameters:
path - Path inside the current directory - Cannot be null but may be empty.
filename - Filename (without path) - Cannot be null or empty
Throws:
DeleteException - There was a problem deleting the file.

loadFile

File loadFile(String path,
              String filename)
              throws LoadingFileException
Loads a file from a source into a local directory.If the file is already up to date nothing will be copied.

Parameters:
path - Path inside the current directory.
filename - Filename (without path).
Returns:
File reference.
Throws:
LoadingFileException - Loading the file failed for some reason.

loadFile

File loadFile(String path,
              String filename,
              org.fuin.utils4swing.progress.FileCopyProgressListener listener)
              throws LoadingFileException
Loads a file from a source into a local directory.If the file is already up to date nothing will be copied.

Parameters:
path - Path inside the current directory.
filename - Filename (without path).
listener - Listener to inform about progress - Can be null if no progress information is needed.
Returns:
File reference.
Throws:
LoadingFileException - Loading the file failed for some reason.


Copyright © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.