/// <summary> /// Get directories of local path in ZipFile. /// </summary> /// <param name="path"></param> /// <returns></returns> public string[] GetDirectories(string path) { path = SanitizeFilename(path); var dirs = m_Directories .Select(dirSym => dirSym.ToString()) .Where(dir => dir.StartsWith(path)); if (dirs.IsEmpty()) { throw new DirectoryNotFoundException(); } var dirLevel = path.Count(c => c == '\\'); return(dirs .Where(dir => dir.Count(c => c == '\\') == dirLevel + 1) .ToArray()); }