/// <summary> /// Enumerate through all objects in a directory. /// </summary> public static IEnumerable <string> EnumerateDirectory(string rootpath) { List <string> ret = new List <string>(); var dir = new Godot.Directory(); dir.Open(rootpath); dir.ListDirBegin(); for (string path = dir.GetNext(); !string.IsNullOrEmpty(path); path = dir.GetNext()) { if (path[0] != '.') { ret.Add(dir.GetCurrentDir() + "/" + path); } } dir.ListDirEnd(); return(ret); }