Checks the existence of the specified file in the specified folder.
Namespace: DotNetNuke.Services.FileSystemAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
| C# |
|---|
public virtual bool FileExists( IFolderInfo folder, string fileName, bool retrieveUnpublishedFiles ) |
| Visual Basic |
|---|
Public Overridable Function FileExists ( folder As IFolderInfo, fileName As String, retrieveUnpublishedFiles As Boolean ) As Boolean |
Parameters
- folder
- Type: DotNetNuke.Services.FileSystem..::..IFolderInfo
The folder where to check the existence of the file.
- fileName
- Type: System..::..String
The file name to check the existence of.
- retrieveUnpublishedFiles
- Type: System..::..Boolean
Indicates if the file is retrieved from All files or from Published files
Return Value
A bool value indicating whether the file exists or not in the specified folder.Implements
IFileManager..::..FileExists(IFolderInfo, String, Boolean)
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | Thrown when folder is null. |
| System..::..ArgumentException | Thrown when fileName is null or empty. |
| DotNetNuke.Services.FileSystem..::..FolderProviderException | Thrown when the underlying system throw an exception. |