|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bibalex.daf.handlers.filehandler.FileHandler
org.bibalex.daf.entities.phase.MockFileHandler
public class MockFileHandler
Copyright (c) 2006-2007 by Bibliotheca Alexandrina
Field Summary |
---|
Fields inherited from class org.bibalex.daf.handlers.filehandler.FileHandler |
---|
pathSeparator |
Constructor Summary | |
---|---|
MockFileHandler()
|
Method Summary | |
---|---|
boolean |
createFolder(java.lang.String parentFolder,
java.lang.String folderName)
When ovevrridden in a derived class creates a folder at the specified location. |
boolean |
createPath(java.lang.String path)
When overridden in a derived class creates the complete path. |
boolean |
deleteFolder(java.lang.String path,
boolean recursive)
When overridden in a derived class deletes the folder and its subfolders. |
boolean |
downloadFile(java.lang.String sourcePath,
java.lang.String fileName,
java.lang.String destinationPath,
java.lang.String newName)
When overridden in a derived class downloads the file from source to destination. |
boolean |
downloadFiles(java.lang.String source,
java.lang.String extention,
java.lang.String destination)
When overridden in a derived class downloads the files with the given extention from source to destination. |
boolean |
downloadFolder(java.lang.String source,
java.lang.String folderName,
java.lang.String destination,
java.lang.String newName)
When overridden in a derived class downloads a folder from source to destination. |
boolean |
folderExists(java.lang.String folderPath)
When overridden in a derived class determines whether the folder exists or not. |
java.io.File[] |
getFiles(java.lang.String parentFolder)
When overridden in a derived class gets the files within the given folder. |
java.io.File[] |
getFiles(java.lang.String parentFolder,
java.lang.String extention)
When overridden in a derived class gets the files with a specific extention within the given folder. |
int |
getFilesCount(java.lang.String parentFolder)
When overridden in a derived class gets the count of files within the given folder. |
int |
getFilesCount(java.lang.String parentFolder,
java.lang.String extention)
When overridden in a derived class gets the count of files with a specific extention within the given folder. |
int |
getFilesCountRecursively(java.lang.String parentFolder)
When overridden in a derived class gets the count of files within the given folder recursively. |
long |
getFileSize(java.lang.String filePath)
When ovevrridden in a derived class gets the size of the file. |
java.lang.String[] |
getFilesNames(java.lang.String parentFolder)
When overridden in a derived class gets the names of the files within the given folder. |
java.lang.String[] |
getFilesNames(java.lang.String parentFolder,
java.lang.String extention)
When overridden in a derived class gets the names of the files with a specific extention within the given folder. |
java.io.File[] |
getFilesRecursively(java.lang.String parentFolder)
When overridden in a derived class gets the files within the given folder recursively |
long |
getFolderSize(java.lang.String folderPath)
When ovevrridden in a derived class gets the size of the size of the folder recursively. |
java.lang.String[] |
getSubFolders(java.lang.String parentFolder)
When overridden in a derived class gets a list of subfolders within the given folder. |
boolean |
uploadFile(java.lang.String sourcePath,
java.lang.String fileName,
java.lang.String destinationPath,
java.lang.String newName)
When overridden in a derived class uploads the file from source to destination. |
boolean |
uploadFiles(java.lang.String source,
java.lang.String extention,
java.lang.String destination)
When overridden in a derived class uploads the files with the given extention from source to destination. |
boolean |
uploadFolder(java.lang.String source,
java.lang.String folderName,
java.lang.String destination,
java.lang.String newName)
When overridden in a derived class uploads a folder from source to destination. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockFileHandler()
Method Detail |
---|
public boolean createFolder(java.lang.String parentFolder, java.lang.String folderName)
FileHandler
createFolder
in class FileHandler
parentFolder
- The parent folder path.folderName
- The name of the folder to create
public boolean downloadFolder(java.lang.String source, java.lang.String folderName, java.lang.String destination, java.lang.String newName)
FileHandler
downloadFolder
in class FileHandler
source
- The source parent folder.folderName
- The name of the folder to copy.destination
- The destination parent folder.newName
- The new name of the folder after copying.
public boolean uploadFolder(java.lang.String source, java.lang.String folderName, java.lang.String destination, java.lang.String newName)
FileHandler
uploadFolder
in class FileHandler
source
- The source parent folder.folderName
- The name of the folder to copy.destination
- The destination parent folder.newName
- The new name of the folder after copying.
public boolean downloadFiles(java.lang.String source, java.lang.String extention, java.lang.String destination)
FileHandler
downloadFiles
in class FileHandler
source
- The source folder that contain the files.extention
- The extension of the files to be copied.;destination
- The destination folder to which the files will be copied.
public boolean uploadFiles(java.lang.String source, java.lang.String extention, java.lang.String destination)
FileHandler
uploadFiles
in class FileHandler
source
- The source folder that contain the files.extention
- The extension of the files to be copied.;destination
- The destination folder to which the files will be copied.
public boolean deleteFolder(java.lang.String path, boolean recursive)
FileHandler
deleteFolder
in class FileHandler
path
- The path of the folder.recursive
- Whether to delete subfiles and subfolders or not.
public java.lang.String[] getSubFolders(java.lang.String parentFolder)
FileHandler
getSubFolders
in class FileHandler
parentFolder
- The folder to get its subfolders.
public int getFilesCount(java.lang.String parentFolder, java.lang.String extention)
FileHandler
getFilesCount
in class FileHandler
parentFolder
- The folder to get the count of files within it.extention
- The extention of the files to count.
public int getFilesCount(java.lang.String parentFolder)
FileHandler
getFilesCount
in class FileHandler
parentFolder
- The folder to get the count of files within it.
public boolean folderExists(java.lang.String folderPath)
FileHandler
folderExists
in class FileHandler
folderPath
- The folder path.
public java.io.File[] getFiles(java.lang.String parentFolder)
FileHandler
getFiles
in class FileHandler
parentFolder
- The folder to get the files within it.
public java.io.File[] getFiles(java.lang.String parentFolder, java.lang.String extention)
FileHandler
getFiles
in class FileHandler
parentFolder
- The folder to get the files within it.extention
- The extention of the files to get.
public boolean createPath(java.lang.String path)
FileHandler
createPath
in class FileHandler
path
- The path to create.
public java.lang.String[] getFilesNames(java.lang.String parentFolder)
FileHandler
getFilesNames
in class FileHandler
parentFolder
- The folder to get the names of the files within it.
public java.lang.String[] getFilesNames(java.lang.String parentFolder, java.lang.String extention)
FileHandler
getFilesNames
in class FileHandler
parentFolder
- The folder to get the names of the files within it.extention
- The extention of the files to get its name.
public long getFileSize(java.lang.String filePath)
FileHandler
getFileSize
in class FileHandler
filePath
- The complete path of the the file, that is: parent folder + file name + extension.
public long getFolderSize(java.lang.String folderPath)
FileHandler
getFolderSize
in class FileHandler
folderPath
- The complete path of the the folder, that is: parent folder + folder name.
public int getFilesCountRecursively(java.lang.String parentFolder)
FileHandler
getFilesCountRecursively
in class FileHandler
parentFolder
- The folder to get the count of files within it.
public java.io.File[] getFilesRecursively(java.lang.String parentFolder)
FileHandler
getFilesRecursively
in class FileHandler
parentFolder
- The folder to get the files within it.
public boolean downloadFile(java.lang.String sourcePath, java.lang.String fileName, java.lang.String destinationPath, java.lang.String newName)
FileHandler
downloadFile
in class FileHandler
sourcePath
- The path of the source folder containg the file.fileName
- The name of the file within the source folder to copy.destinationPath
- The path of the destination folder.newName
- The new name of the file at the destination folder.
public boolean uploadFile(java.lang.String sourcePath, java.lang.String fileName, java.lang.String destinationPath, java.lang.String newName)
FileHandler
uploadFile
in class FileHandler
sourcePath
- The path of the source folder containg the file.fileName
- The name of the file within the source folder to copy.destinationPath
- The path of the destination folder.newName
- The new name of the file at the destination folder.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |