从与模式目录中获取文件 [英] Get files from directory with pattern

查看:97
本文介绍了从与模式目录中获取文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/163162/can-you-call-directory-getfiles-with-multiple-filters">Can你叫Directory.GetFiles()与多个过滤器?

是否有可能获得恩。 .C 的.H 从目录中的文件。对 Directory.GetFiles使用(C:\, .C; 的.H); 不起作用。这太糟糕了调用 Directory.GetFiles(...); 两次..:(

Does it possible to get for ex. .c and .hfiles from directory. Usage of Directory.GetFiles("C:\", ".c;.h"); does not work. It's too bad to invoke Directory.GetFiles(...); twice.. :(

感谢。

推荐答案

它无法指定单一的GetFiles多个过滤器()方法调用。你可以找到替代品<一个href="http://stackoverflow.com/questions/163162/can-you-call-directory-getfiles-with-multiple-filters">here

its not possible to specify multiple filters in single GetFiles() method call. You can find alternatives here

这篇关于从与模式目录中获取文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆