使用C#
Custom C# Parsing Solution:
Although the FtpWebRequest class does not natively handle these format variations, one can create a custom C# solution.对于DOS风格的格式,可以使用以下代码: .value;
dateTime修改= dateTime.parseexact(s,“ mm-dd-yy hh:mmtt”,文化,dateTimestyles.none);
s = match.groups [2] .value;
长尺寸=(s!=“
files = session.enumererateMoteFiles(path,null); foreach(文件中的远程文件文件) { console.writeline(“ {0,-16} {1,9} {2} {2}”,file.name,file.length,file.lastwriteTime); }
结论:[&&&&&&&&&&&&&&&&&&&&&& && && &&&&& && && && && && && && && && && && && && &&&华,需要仔细处理各种格式。尽管可以使用自定义解决方案,但使用支持现代MLSD命令的库更可靠。这种方法„ liemisthe lomiss始终解析,并简化了从FTP响应中提取相关文件和目录元数据的任务。免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3