Ejemplo n.º 1
0
 /// <summary>
 /// Collects all files located under specified path and stores them in <seealso cref="FileComponent"/> object.
 /// Only results matching specified regular expression are gathered. Scope of collection depends on current
 /// <seealso cref="Scope"/> state.
 /// <para>Reference of regular expression language: http://msdn.microsoft.com/en-us/library/az24scfc%28v=vs.110%29.aspx </para>
 /// </summary>
 /// <param name="path">Top directory path</param>
 /// <returns>Files located under specifiad path</returns>
 public override FileComponent GetFilesFromDirectory(string path)
 {
     string[] filePaths         = DirectoryWrapper.GetFiles(path, "*", TranslateScope(scope));
     string[] filteredFilePaths = filterPathsByRegex(filePaths);
     return(FileComponentFactory.ConstructComponents(filteredFilePaths));
 }
 /// <summary>
 /// Collects all files located under specified path and stores them in <seealso cref="FileComponent"/> object.
 /// Only results matching specified patern are gathered. Scope of collection depends on current
 /// <seealso cref="Scope"/> state.
 /// </summary>
 /// <param name="path">Top directory path</param>
 /// <returns>Files located under specifiad path</returns>
 public override FileComponent GetFilesFromDirectory(string path)
 {
     string[] filePaths = DirectoryWrapper.GetFiles(path, this.rule, TranslateScope(this.scope));
     return(FileComponentFactory.ConstructComponents(filePaths));
 }