diff --git a/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs b/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs
index 980c1fefa..2bba24dce 100644
--- a/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs
+++ b/src/Orchard/FileSystems/Media/FileSystemStorageProvider.cs
@@ -64,6 +64,15 @@ namespace Orchard.FileSystems.Media {
#region Implementation of IStorageProvider
+ ///
+ /// Checks if the given file exists within the storage provider.
+ ///
+ /// The relative path within the storage provider.
+ /// True if the file exists; False otherwise.
+ public bool FileExists(string path) {
+ return new FileInfo(MapStorage(path)).Exists;
+ }
+
///
/// Retrieves the public URL for a given file within the storage provider.
///
@@ -106,6 +115,15 @@ namespace Orchard.FileSystems.Media {
.ToList();
}
+ ///
+ /// Checks if the given folder exists within the storage provider.
+ ///
+ /// The relative path within the storage provider.
+ /// True if the folder exists; False otherwise.
+ public bool FolderExists(string path) {
+ return new DirectoryInfo(MapStorage(path)).Exists;
+ }
+
///
/// Lists the folders within a storage provider's path.
///