dutchcoders / goftp

Golang FTP library with Walk support.
MIT License
278 stars 99 forks source link

Walk() function isn't suitable to my ftp server #44

Closed Wang-Kai closed 5 years ago

Wang-Kai commented 5 years ago

While type ls in my ftp client

ftp> ls
227 Entering Passive Mode (115,236,20,197,39,17).
150 Here comes the directory listing.
-rw-r--r--    1 681      681      187500016 Mar 04 07:26 everyday-20190227-0-ready.df
-rw-r--r--    1 681      681      187500016 Mar 04 08:32 everyday-20190304-a001-ready.df
-rw-r--r--    1 681      681      187500016 Mar 04 08:33 everyday-20190304-a002-ready.df
-rw-r--r--    1 681      681      187500016 Mar 04 08:33 everyday-20190304-a003-ready.df
-rw-r--r--    1 681      681      187500016 Mar 04 08:33 everyday-20190304-a004-ready.df
-rw-r--r--    1 681      681      187500016 Mar 04 08:34 everyday-20190304-a005-ready.df

but the function parseLine can't get relative info correctly

Wang-Kai commented 5 years ago

I iterate all result for List() and parse each line, so i can get filename (Don't forget to trim \n\r), then i can download each file easily.