Here I'm trying to check whether the file exist or not.but the below code doesn't return anything and also get the error at this line
Error line : Boolean t = fileslist.Exists()
start()
def start(){
def store;
boolean success;
def ftpClient = new FTPClient()
ftpClient.connect(server)
ftpClient.login(user,pass)
ftpClient.enterLocalPassiveMode()
FTPFile[] fileslist = ftpClient.listFiles("/Sample.txt")
ftpClient.setFileType(FTP.BINARY_FILE_TYPE)
filelist.each{
it.exists()
}
ftpClient.disconnect()
}
Thanks