List() takes an argument.
This commit is contained in:
parent
7b2259fd5d
commit
faca79d4ea
4
ftp.go
4
ftp.go
@ -128,14 +128,14 @@ func parseListLine(line string) (*Entry, os.Error) {
|
|||||||
return e, nil
|
return e, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ServerConn) List() (entries []*Entry, err os.Error) {
|
func (c *ServerConn) List(path string) (entries []*Entry, err os.Error) {
|
||||||
r, err := c.openDataConnection()
|
r, err := c.openDataConnection()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer r.Close()
|
defer r.Close()
|
||||||
|
|
||||||
c.conn.Cmd("LIST")
|
c.conn.Cmd("LIST %s", path)
|
||||||
_, _, err = c.conn.ReadCodeLine(StatusAboutToSend)
|
_, _, err = c.conn.ReadCodeLine(StatusAboutToSend)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user