From fc5c6c0404b06accb3617c0d4f181bb7c344119c Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Mon, 28 Feb 2022 16:16:25 -0700 Subject: Use IFileSystem --- Emby.Server.Implementations/IO/ManagedFileSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Emby.Server.Implementations/IO/ManagedFileSystem.cs') diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs index 4f8a52f41..ee6846ad3 100644 --- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs +++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs @@ -704,6 +704,12 @@ namespace Emby.Server.Implementations.IO return Directory.EnumerateFileSystemEntries(path, "*", GetEnumerationOptions(recursive)); } + /// + public virtual bool Exists(string path) + { + return Directory.Exists(path) || File.Exists(path); + } + private EnumerationOptions GetEnumerationOptions(bool recursive) { return new EnumerationOptions -- cgit v1.2.3