28 lines
No EOL
907 B
Groovy
28 lines
No EOL
907 B
Groovy
ftpremote = load("${autobuilder.commonscripts()}/remoteaccess/ftp.groovy")
|
|
|
|
def getHostedFTPSiteInfo() {
|
|
hostedftpsiteinfo =
|
|
ftpremote.createFTPSiteInfo("ftp.hostedftp.com",
|
|
"ftp@globalinkjetsystems.com",
|
|
"ramshorn42",
|
|
"/Customers/")
|
|
return hostedftpsiteinfo
|
|
}
|
|
|
|
def getCustomerList() {
|
|
def List<String> customerfilenames = new ArrayList<String>()
|
|
def List<String> customers = new ArrayList<String>()
|
|
|
|
def ftpsiteinfo = getHostedFTPSiteInfo()
|
|
def ftpclient = ftpremote.createFTPClient(ftpsiteinfo)
|
|
|
|
customerfilenames = ftpclient.listNames()
|
|
for(customer in customerfilenames) {
|
|
def String converted = new String(customer.getBytes("ISO-8859-1"), "UTF-8")
|
|
customers.add(converted)
|
|
}
|
|
ftpclient.disconnect()
|
|
return customers
|
|
}
|
|
|
|
return this; |