上Ftp.raw運行的console.log顯示:
{ [Function]
abor: [Function],
pwd: [Function],
cdup: [Function],
feat: [Function],
noop: [Function],
quit: [Function],
pasv: [Function],
syst: [Function],
cwd: [Function],
dele: [Function],
list: [Function],
mdtm: [Function],
mkd: [Function],
mode: [Function],
nlst: [Function],
pass: [Function],
retr: [Function],
rmd: [Function],
rnfr: [Function],
rnto: [Function],
site: [Function],
stat: [Function],
stor: [Function],
type: [Function],
user: [Function],
xrmd: [Function],
opts: [Function],
chmod: [Function],
size: [Function] }
問題在於CD不是一個有效的函數,因此是錯誤。您應該使用Ftp.raw.cwd
來代替當前目錄。如果你想升級一級,cdup
功能似乎是爲此目的而實施的。
嘗試'Ftp.raw.cwd(「子文件夾」,cb)' – 2014-09-26 17:03:52