示例#1
0
		private string[] ExpandFiles(string @base, IList<object> files)
		{
			var matcher = CreateMatcher();
			var fullFiles = files.Select(f => _pathHelper.MakeFull(@base, f.ToString()));
			var glob = new Glob(fullFiles);
			var result = glob.Execute(new DirectoryInfoWrapper(
				new DirectoryInfo(_env.ContentRootPath)));
			return result.Files
				.Select(f => Path.Combine(_env.ContentRootPath, f.Path))
				.Select(f => _pathHelper.MakeRelative(f))
				.Where(f => _pathHelper.FileExists(f)).ToArray();
		}