This commit is contained in:
gqh
2023-01-09 23:04:53 +08:00
parent d0497aa043
commit 311c7c723a
52 changed files with 1572 additions and 331 deletions

View File

@@ -15,7 +15,7 @@ class FtpController():
ftp = FTP()
def __init__(self, host="192.168.50.202", port=21, username="ftpuser", password="123456"):
def __init__(self, host, port, username, password):
try:
self.ftp.connect(host, port)
self.ftp.login(username, password)
@@ -34,7 +34,7 @@ class FtpController():
if file.find(".") != -1:
self.download_file(server, file)
else:
return
return False
# 下载指定目录下的指定文件
def download_file(self, serverfile, remotefile):