Package org.alfresco.ftp.dsl
Class FTPUtil
java.lang.Object
org.alfresco.ftp.dsl.FTPUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanVerify if a file or folder exists in FTPList<org.alfresco.utility.model.ContentModel>Get a list of contents (file and folders) from current locationgetContent(String filePath) Return the content of <filPath though FTP protocolList<org.alfresco.utility.model.FileModel>getFiles()Get a list of files from current locationintGet file size.List<org.alfresco.utility.model.FolderModel>Get a list of folders from current locationprotected intprotected booleanisContentInList(org.alfresco.utility.model.ContentModel contentModel, List<org.alfresco.utility.model.ContentModel> contents) protected booleanisFileInList(org.alfresco.utility.model.FileModel fileModel, List<org.alfresco.utility.model.FileModel> files) protected booleanisFolderInList(org.alfresco.utility.model.FolderModel folderModel, List<org.alfresco.utility.model.FolderModel> folders) setNewFile(org.alfresco.utility.model.FileModel fileModel)
-
Constructor Details
-
FTPUtil
-
-
Method Details
-
getContent
Return the content of <filPath though FTP protocol- Parameters:
filePath-- Returns:
- Throws:
IOException
-
contentExists
Verify if a file or folder exists in FTP- Returns:
- Throws:
Exception
-
isFolderInList
protected boolean isFolderInList(org.alfresco.utility.model.FolderModel folderModel, List<org.alfresco.utility.model.FolderModel> folders) -
isFileInList
protected boolean isFileInList(org.alfresco.utility.model.FileModel fileModel, List<org.alfresco.utility.model.FileModel> files) -
isContentInList
protected boolean isContentInList(org.alfresco.utility.model.ContentModel contentModel, List<org.alfresco.utility.model.ContentModel> contents) -
getFolders
Get a list of folders from current location- Returns:
- List
- Throws:
Exception
-
getFiles
Get a list of files from current location- Returns:
- List
- Throws:
Exception
-
getChildren
Get a list of contents (file and folders) from current location- Returns:
- List
- Throws:
Exception
-
setNewFile
- Throws:
Exception
-
getFileSize
Get file size. Return 0 if resource is a folder- Returns:
- file size
- Throws:
Exception
-
getReplyCode
protected int getReplyCode()
-