瀏覽代碼

List() takes an argument.

jlaffaye 15 年之前
父節點
當前提交
faca79d4ea
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      ftp.go

+ 2 - 2
ftp.go

@@ -128,14 +128,14 @@ func parseListLine(line string) (*Entry, os.Error) {
 	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()
 	if err != nil {
 		return
 	}
 	defer r.Close()
 
-	c.conn.Cmd("LIST")
+	c.conn.Cmd("LIST %s", path)
 	_, _, err = c.conn.ReadCodeLine(StatusAboutToSend)
 	if err != nil {
 		return