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.3.4 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.3.3 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.3.2 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.3.1 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.3.0 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.2.3 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.2.2 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.2.1 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.2.0 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.1.5 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.1.4 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.1.3 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.1.2 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.1.1 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.1.0 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.21 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.20 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.19 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.18 examples/Example1/Assets/Editor/FileSystemUtil.cs
u3d-1.0.17 examples/Example1/Assets/Editor/FileSystemUtil.cs