仅获取比t年轻的文件
有没有办法将文件从比特定年龄年轻的目录中获取?
因此,此方法将产生此结果,但是它将首先获取所有文件,然后忽略那些不适合的人,这效率很低。
dim files = dir.getfiles()。其中(function(x)x.lastwritetime> = ts)'dir:directoryInfo,ts:dateTime
Is there a way to get only the files out of a directory which are younger than a specific age?
So this method will produce this result, but it will get all files first and then disregard those who dont fit, which is quite inefficient.
Dim Files = dir.GetFiles().Where(Function(x) x.LastWriteTime >= ts) 'dir: DirectoryInfo, ts: DateTime
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论