Open awm33 opened 4 years ago
Would be very happy to see a solution that works for a wider selection of FTP servers (but I don't suppose we would ever catch them all). The trouble is, we only test against the python implementation, so we can't actually put this into CI unless there's some docker or other executable version of this we can run.
@martindurant I have a working solution. I use a regex in _mlsd2
to detect windows FTP server style lines and default to unix. I realize an e2e testing is more ideal, but really this boils down to text processing in _mlsd2
, perhaps a unit test on _mlsd2
would suffice?
Yes that sounds fine, please do submit as an PR.
Are you working on this, @awm33 ?
(ping)
First off, thank you for creating this incredible library!
I'm trying to use fsspec to load data from a couple older FTP servers. They don't support the
MLSD
FTP command and the_mlsd2
functions seems to assume an older UNIX based FTP server.I suppose for improving it would be to use regular expressions in
_mlsd2
to "sniff" for which format it is.Examples:
ftp.onetgov.net fsspec URL: "ftp://ftp.onetgov.net/divisions/Infomap/pub/GIS_Downloads/FTP Shapefiles/Address Range.zip" python FTP
dir
output:sdrftp03.dor.state.fl.us fsspec URL: "ftp://sdrftp03.dor.state.fl.us/Tax Roll Data Files/2020 Final NAL - SDF Files/Citrus 19 Final NAL 2020.zip" python FTP
dir
output: