public class FtpHandler extends Object
| Constructor and Description |
|---|
FtpHandler() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
changeDirectory(String pathFtp)
Change directory Method.
|
boolean |
closeConnection()
Close Connection Method.
|
boolean |
fileExists(String pathFile)
Change directory Method.
|
long |
getFileSize(String remoteFile) |
boolean |
openConnection(String ftpServer,
int ftpPort,
String ftpUser,
String ftpPassword,
boolean passiveMode)
Open Connection Method.
|
boolean |
renameFtpFile(String artifactName,
String newArtifactName,
String ftpDirectory)
Rename file Method.
|
boolean |
uploadFile(File localFile,
String remoteFile) |
public boolean openConnection(String ftpServer, int ftpPort, String ftpUser, String ftpPassword, boolean passiveMode)
ftpServer - serverftpPort - ftp portftpUser - userftpPassword - passwordpassiveMode - passive modepublic boolean changeDirectory(String pathFtp)
pathFtp - path ftp serverpublic boolean fileExists(String pathFile)
pathFile - path filepublic long getFileSize(String remoteFile)
public boolean renameFtpFile(String artifactName, String newArtifactName, String ftpDirectory)
artifactName - String - path old filename.newArtifactName - String - path new filename.ftpDirectory - String - default path in the ftp server.public boolean closeConnection()
Copyright © 2016–2018. All rights reserved.