Skip to content

Latest commit

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

FTP client for Go(lang)

install

go get github.com/smallfish/ftp

example

package main
import (
"fmt""github.com/smallfish/ftp""io/ioutil""os"
)
funcmain() {
ftp:=new(ftp.FTP)
// debug default falseftp.Debug=trueftp.Connect("localhost", 21)
// loginftp.Login("anonymous", "")
ifftp.Code==530 {
fmt.Println("error: login failure")
os.Exit(-1)
}
// pwdftp.Pwd()
fmt.Println("code:", ftp.Code, ", message:", ftp.Message)
// make dirftp.Mkd("/path")
ftp.Request("TYPE I")
// stor fileb, _:=ioutil.ReadFile("/path/a.txt")
ftp.Stor("/path/a.txt", b)
ftp.Quit()
}

About

FTP Client For Go(lang)

Resources

Stars

84 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages