I think it's because lFilename
is the name of the file including it's path.
If it's possible in your case then use Contains
new Files(
new Feature("RootFilesFeature"),
Path.Combine(C_SERVICE_RELEASE_PATH,"*.*"),
(lFilename) => !lFilename.Contains("appsettings")
)
or EndsWith
new Files(new Feature("RootFilesFeature"),
Path.Combine(C_SERVICE_RELEASE_PATH, "*.*"),
(lFilename) => !lFilename.EndsWith("appsettings.json", true) ||
!lFilename.EndsWith("appsettings.development.json", true)
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…