System.IHleIoDriverExtensions.ListDirRecursive C# (CSharp) Method

ListDirRecursive() public static method

public static ListDirRecursive ( this HleIoDriver, string Path ) : IEnumerable
HleIoDriver this
Path string
return IEnumerable
        public static IEnumerable<string> ListDirRecursive(this IHleIoDriver HleIoDriver, string Path)
        {
            foreach (var Item in HleIoDriver.ListDir(Path))
            {
                yield return "/" + (Path + "/" + Item.Name).TrimStart('/');
                if (Item.Stat.Attributes.HasFlag(IOFileModes.Directory))
                {
                    foreach (var InnerItem in HleIoDriver.ListDirRecursive(Path + "/" + Item.Name))
                    {
                        yield return InnerItem;
                    }
                }
            }
        }