Tom*_*Tom 4 c# asp.net file-io
如何更改此代码以枚举子目录?
var fqFilenames= new List<String>(System.IO.Directory.GetFiles(sMappedPath));
var filenames= fqFilenames.ConvertAll((s) => { return s.Replace(sMappedPath+"\\", ""); });
FileListView.DataSource = filenames;
Run Code Online (Sandbox Code Playgroud)
Jon*_*eet 20
你能用Directory.GetFiles(string, string, SearchOption)
吗?如果没有,请解释您需要的内容.
例如:
Directory.GetFiles(sMappedPath, "*", SearchOption.AllDirectories)
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8962 次 |
最近记录: |