Determine if a listing is a directory or file in Python over FTP

后端 未结 3 788
遥遥无期
遥遥无期 2020-12-19 08:40

Python has a standard library module ftplib to run FTP communications. It has two means of getting a listing of directory contents. One, FTP.nlst()

3条回答
  •  执念已碎
    2020-12-19 09:04

    If the FTP server supports the MLSD command, then please check that answer for a couple of useful classes (FTPDirectory and FTPTree).

提交回复
热议问题