赞
踩
- /// <summary>
- /// 获得文件下的所有文件名
- /// </summary>
- /// <param name="path">路径</param>
-
- private void GetDirectoryFile(string path)
- {
- if (Directory.Exists(path))
- {
- DirectoryInfo direction = new DirectoryInfo(path);
- FileInfo[] files = direction.GetFiles("*", SearchOption.AllDirectories);
- for (int i = 0; i < files.Length; i++)
- {
- if (files[i].Name.EndsWith(".meta"))
- {
- continue;
- }
- Debug.Log("Name : " + files[i].Name);//文件名
- Debug.Log("FullName : " + files[i].FullName);//根目录下的文件的目录
- Debug.Log("DirectoryName : " + files[i].DirectoryName);//根目录
-
- }
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。