Gets the file metadata for the specified file.
Namespace: DotNetNuke.Services.FileSystemAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
C# |
---|
IFileInfo GetFile( int portalId, string relativePath, bool retrieveUnpublishedFiles ) |
Visual Basic |
---|
Function GetFile ( portalId As Integer, relativePath As String, retrieveUnpublishedFiles As Boolean ) As IFileInfo |
Parameters
- portalId
- Type: System..::..Int32
The portal ID or Null.NullInteger for the Host
- relativePath
- Type: System..::..String
Relative path to the file.
- retrieveUnpublishedFiles
- Type: System..::..Boolean
Indicates if the file is retrieved from All files or from Published files
Return Value
The IFileInfo object with the metadata of the specified file.
Remarks
Host and portal settings commonly return a relative path to a file. This method uses that relative path to fetch file metadata.