From d8d5dd487326dd3fccf4e9f30cd8f7e3783fcfda Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 12 Jan 2015 22:46:44 -0500 Subject: make channel access opt-in rather than opt out --- .../IO/CommonFileSystem.cs | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs') diff --git a/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs b/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs index 68df0e52a..c54b053fd 100644 --- a/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs +++ b/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs @@ -270,8 +270,8 @@ namespace MediaBrowser.Common.Implementations.IO File.Copy(temp1, file2, true); File.Copy(temp2, file1, true); - File.Delete(temp1); - File.Delete(temp2); + DeleteFile(temp1); + DeleteFile(temp2); } /// @@ -409,5 +409,25 @@ namespace MediaBrowser.Common.Implementations.IO //return Path.IsPathRooted(path); } + + public void DeleteFile(string path, bool sendToRecycleBin) + { + File.Delete(path); + } + + public void DeleteDirectory(string path, bool recursive, bool sendToRecycleBin) + { + Directory.Delete(path, recursive); + } + + public void DeleteFile(string path) + { + DeleteFile(path, false); + } + + public void DeleteDirectory(string path, bool recursive) + { + DeleteDirectory(path, recursive, false); + } } } -- cgit v1.2.3