Exclusion pattern for CleanDirectory in cake

53 Views Asked by At

How can I create an exclusion pattern within CleanDirectory so that one specific file in that folder does not get deleted?

This is my current code but it wipes the entire folder.

var myPath = GetDirectories("/folder").First();
CleanDirectory(myPath);

Does it have a facility for that I might be missing? I could not fid one: https://cakebuild.net/api/Cake.Common.IO/DirectoryAliases/36068142

0

There are 0 best solutions below