Sha256: a3e37b0ab8d4af297fef94a8bd3c4a640882e86f71bc5cea235388baf402165e

Contents?: true

Size: 592 Bytes

Versions: 43

Compression:

Stored size: 592 Bytes

Contents

using System.IO;
using System.Collections.Generic;

public static class FileSystemUtil
{	
	public static IEnumerable<string> GetFiles(string path) {
		Queue<string> queue = new Queue<string>();
		queue.Enqueue(path);
		while (queue.Count > 0) {
			path = queue.Dequeue();
			if (!Directory.Exists(path)) continue;
			foreach (string subDir in Directory.GetDirectories(path)) {
				queue.Enqueue(subDir);
			}
			string[] files = null;
			files = Directory.GetFiles(path);
			if (files != null) {
				for(int i = 0 ; i < files.Length ; i++) {
					yield return files[i];
				}
			}
		}
	}
}


Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
u3d-1.0.16 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.15 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.14 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.13 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.12 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.11 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.10 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.9 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.8 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.7 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.6 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.5 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.4 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.3 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.2 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.1 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.0 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.0.rc1 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-0.9.4 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-0.9.3 examples/Example1/Assets/Editor/FileSystemUtil.cs