[討論] ftp中使用dir遭遇問題

看板MATLAB作者 (昆)時間1年前 (2022/10/04 10:42), 編輯推噓1(108)
留言9則, 2人參與, 1年前最新討論串1/1
請問 本來想寫一個連進ftp抓檔案的小程式。 但FTP server的網路時好時壞,可能載一半中斷 所以打算增加一個檔案大小比較的部分,確保有完整下載檔案。 但是剛剛測試後發現 用dir(ftp_obj.)只能取得檔名,但是bytes的變數都是空的。 包含其他 date, isdir, datenum等等都是空的... 請問有大大遇過類似的問題嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.116.57.230 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1664851337.A.C7E.html

10/04 11:00, 1年前 , 1F
你可以看一下官方的說明文件
10/04 11:00, 1F

10/04 11:00, 1年前 , 2F
The dir function might return a structure array in
10/04 11:00, 2F

10/04 11:01, 1年前 , 3F
which the last four fields are empty or missing. When
10/04 11:01, 3F

10/04 11:01, 1年前 , 4F
dir returns a structure with missing information, it
10/04 11:01, 4F

10/04 11:01, 1年前 , 5F
might mean the SFTP or FTP object is not configured for
10/04 11:01, 5F

10/04 11:01, 1年前 , 6F
the operating system that is running on the SFTP or FTP
10/04 11:01, 6F

10/04 11:01, 1年前 , 7F
server. By default, an SFTP or FTP object is configured
10/04 11:01, 7F

10/04 11:02, 1年前 , 8F
to connect to a server running a UNIX operating system
10/04 11:02, 8F

10/04 14:08, 1年前 , 9F
了解,非常感謝
10/04 14:08, 9F
文章代碼(AID): #1ZEvs9n- (MATLAB)
文章代碼(AID): #1ZEvs9n- (MATLAB)