Feature request: IStorageProvider.FileExists() and FolderExists()


Currently there is no way to check if a file or folder exists with the use of an IStorageProvider implementation. For example this makes it impossible to overwrite a file without catching exceptions, see the discussion: http://orchard.codeplex.com/discussions/275146
This interface change would break existing third-party implementations, though.


AimOrchard wrote Mar 28, 2012 at 8:01 AM

I'd like to see the same for checking the existence of folders as well.

Currently I have to 'ListFolders' the parent folder to see if my target folder exists.

Alszo 'ListFiles/ListFolders' also automatically try to create the directory if it doesn't exist : I'm sure that not everyone likes this default behavior.

Piedone wrote Mar 28, 2012 at 9:08 AM

If you take a look the the fork, FolderExists() is implemented as well :-).