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(java.lang.String path, java.lang.String filename)
          Delete a file in the given directory.
 void deletePath(java.lang.String path)
          Delete all files in the given directory.
 java.io.File loadFile(java.lang.String path, java.lang.String filename)
          Loads a file from a source into a local directory.If the file is already up to date nothing will be copied.
 java.io.File loadFile(java.lang.String path, java.lang.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(java.lang.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(java.lang.String path,
                java.lang.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

java.io.File loadFile(java.lang.String path,
                      java.lang.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

java.io.File loadFile(java.lang.String path,
                      java.lang.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 © 2009 Future Invent Informationsmanagement GmbH. All Rights Reserved.