示例#1
0
        public static List <FilePath> GetFileSet(this ICakeContext context, FileSetSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            if (settings.BasePath == null)
            {
                settings.BasePath = context.Environment.WorkingDirectory;
            }

            return(FileSet
                   .Find(settings)
                   .ToList());
        }
示例#2
0
 /// <summary>
 /// Gets a fileset by FileSetSettings
 /// </summary>
 /// <example>
 /// <code>
 /// IEnumerable&gt;FilePath&lt; filePaths = FileSet.Find(new FileSetSettings());
 /// </code>
 /// </example>
 /// <returns>Returns an IEnumerable of <c>FilePath</c> that match the input patterns.</returns>
 /// <param name="settings">Settings for fileset.</param>
 public static IEnumerable <FilePath> Find(FileSetSettings settings)
 {
     return(Find(settings.BasePath.FullPath, settings.Includes, settings.Excludes, settings.CaseSensitive));
 }