public string[] GetFiles(string path) { if (!IsValidPath(path)) { return(new string[0]); } int pathsCount = path.Split('/').Length; if (path == "/") { pathsCount = 1; } StringCollection result = new StringCollection(); for (int i = 0; i < _files.Count; i++) { if (_files[i].StartsWith(path) && _files[i].Split('/').Length == (pathsCount + 1)) { result.Add(_files[i]); } } return(result.GetItems()); }
public string[] GetAllFiles() { //StringCollection sc = new StringCollection(); //foreach (ZipEntry ze in _zip) //{ // if (ze.IsFile) // { // sc.Add("/" + ze.Name); // } //} //sc.Sort(); //return sc.GetItems(); return(_files.GetItems()); }
public string[] GetFiles(string path) { if (!IsValidPath(path)) return new string[0]; int pathsCount = path.Split('/').Length; if (path == "/") pathsCount = 1; StringCollection result = new StringCollection(); for (int i = 0; i < _files.Count; i++) { if (_files[i].StartsWith(path) && _files[i].Split('/').Length == (pathsCount + 1)) { result.Add(_files[i]); } } return result.GetItems(); }