Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/FTP/Groovy/ftp.groovy
Normal file
14
Task/FTP/Groovy/ftp.groovy
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
@Grab(group='commons-net', module='commons-net', version='2.0')
|
||||
import org.apache.commons.net.ftp.FTPClient
|
||||
|
||||
println("About to connect....");
|
||||
new FTPClient().with {
|
||||
connect "ftp.easynet.fr"
|
||||
enterLocalPassiveMode()
|
||||
login "anonymous", "ftptest@example.com"
|
||||
changeWorkingDirectory "/debian/"
|
||||
def incomingFile = new File("README.html")
|
||||
incomingFile.withOutputStream { ostream -> retrieveFile "README.html", ostream }
|
||||
disconnect()
|
||||
}
|
||||
println(" ...Done.");
|
||||
Loading…
Add table
Add a link
Reference in a new issue