Deleting a tree of folders using rimraf can be pretty fraught on MS Windows; the OS itself can lock files randomly, and there may be various processes getting in the way, like virus checkers or cloud file syncing apps. rimraf
itself will do an exponential-backoff-and-retry for EBUSY
and ENOTEMPTY
errors on Windows, but you can still see EPERM
and others. If you want to do exponential-backoff-and-retry for any error, see the below recipe, using node-retry.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Linq; | |
using System.ServiceModel.Syndication; | |
using System.Text; | |
using System.Web.Mvc; | |
using System.Xml; | |
using System.Xml.Linq; | |