Gets the file metadata for the specified file.

Namespace: DotNetNuke.Services.FileSystem
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
IFileInfo GetFile(
	int portalId,
	string relativePath
)
Visual Basic
Function GetFile ( 
	portalId As Integer,
	relativePath As String
) 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.

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.

See Also