From 978b8eeda7793765c1bfc742781a1c74fd382f0d Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Mon, 2 Nov 2020 11:19:21 +0100 Subject: [PATCH] Added additional comments on IOHelper.CleanFolder(). --- src/Umbraco.Core/IO/IIOHelper.cs | 3 ++- src/Umbraco.Core/IO/IOHelper.cs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/IO/IIOHelper.cs b/src/Umbraco.Core/IO/IIOHelper.cs index 510e45890f..5a0f5cab45 100644 --- a/src/Umbraco.Core/IO/IIOHelper.cs +++ b/src/Umbraco.Core/IO/IIOHelper.cs @@ -63,7 +63,8 @@ namespace Umbraco.Core.IO DirectoryInfo[] GetTempFolders(); /// - /// Cleans contents of a folder. + /// Cleans contents of a folder by deleting all files older that the provided age. + /// If deletition of any file errors (e.g. due to a file lock) the process will continue to try to delete all that it can. /// /// Folder to clean. /// Age of files within folder to delete. diff --git a/src/Umbraco.Core/IO/IOHelper.cs b/src/Umbraco.Core/IO/IOHelper.cs index f14dabd7ee..08241d28f4 100644 --- a/src/Umbraco.Core/IO/IOHelper.cs +++ b/src/Umbraco.Core/IO/IOHelper.cs @@ -209,11 +209,12 @@ namespace Umbraco.Core.IO } /// - /// Cleans contents of a folder. + /// Cleans contents of a folder by deleting all files older that the provided age. + /// If deletition of any file errors (e.g. due to a file lock) the process will continue to try to delete all that it can. /// /// Folder to clean. /// Age of files within folder to delete. - /// Result of operation + /// Result of operation. public CleanFolderResult CleanFolder(DirectoryInfo folder, TimeSpan age) { folder.Refresh(); // In case it's changed during runtime.