29 using System.Collections;
30 using System.Collections.Generic;
31 using System.Globalization;
33 using System.IO.Compression;
35 using System.Net.Sockets;
36 using System.Reflection;
38 using System.Text.RegularExpressions;
39 using System.Threading;
43 namespace OpenSim.
Tools.Configger
45 public static class Util
47 public static string[] Glob(
string path)
49 string vol=String.Empty;
51 if (Path.VolumeSeparatorChar != Path.DirectorySeparatorChar)
53 string[] vcomps = path.Split(
new char[] {Path.VolumeSeparatorChar}, 2, StringSplitOptions.RemoveEmptyEntries);
55 if (vcomps.Length > 1)
62 string[] comps = path.Split(
new char[] {Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar}, StringSplitOptions.RemoveEmptyEntries);
68 path +=
new String(
new char[] {Path.VolumeSeparatorChar, Path.DirectorySeparatorChar});
70 path =
new String(
new char[] {Path.DirectorySeparatorChar});
72 List<string> paths =
new List<string>();
73 List<string> found =
new List<string>();
77 foreach (
string c
in comps)
81 List<string> addpaths =
new List<string>();
82 foreach (
string p
in paths)
84 string[] dirs = Directory.GetDirectories(p, c);
88 foreach (
string dir
in dirs)
89 addpaths.Add(Path.Combine(path, dir));
93 if (compIndex == comps.Length - 1)
95 string[] files = Directory.GetFiles(p, c);
96 foreach (
string f
in files)
103 return found.ToArray();
106 public static string configDir()