/// <summary> /// Server sends the list of files it has under the path given by client /// </summary> /// <param name="path">the path in the server to search for files</param> /// <returns>the List of files</returns> public List <ProjectTree> getFilesList(string path, bool recurse) { fm = new FileMngr(); fm.Patterns.Add("*.cs"); fm.Recurse = recurse; fm.findFiles(path); fm.createProjectTree(); filestree = fm.getFiles(); return(filestree); }
static void Main(string[] args) { Console.Write("\n Testing File Manager Class"); Console.Write("\n =======================\n"); FileMngr fm = new FileMngr(); fm.Patterns.Add("*.cs"); fm.findFiles("."); foreach (string file in fm.Files) { Console.Write("\n {0}", file); } Console.Write("\n\n"); Console.ReadLine(); }
/// <summary> /// Server sends the list of files it has under the path given by client /// </summary> /// <param name="path">the path in the server to search for files</param> /// <returns>the List of files</returns> public List<ProjectTree> getFilesList(string path, bool recurse) { fm = new FileMngr(); fm.Patterns.Add("*.cs"); fm.Recurse = recurse; fm.findFiles(path); fm.createProjectTree(); filestree = fm.getFiles(); return filestree; }