FileResult Constructors

Definition

Overloads

FileResult(FileBase)

Initializes a new instance of the FileResult class from an existing instance.

FileResult(String)

Initializes a new instance of the FileResult class from a file path.

FileResult(String, String)

Initializes a new instance of the FileResult class from a file path, explicitly specifying the content type.

FileResult(FileBase)

Initializes a new instance of the FileResult class from an existing instance.

public:
 FileResult(Microsoft::Maui::Storage::FileBase ^ file);
public FileResult (Microsoft.Maui.Storage.FileBase file);
new Microsoft.Maui.Storage.FileResult : Microsoft.Maui.Storage.FileBase -> Microsoft.Maui.Storage.FileResult
Public Sub New (file As FileBase)

Parameters

file
FileBase

A FileBase instance that will be used to clone.

Applies to

FileResult(String)

Initializes a new instance of the FileResult class from a file path.

public:
 FileResult(System::String ^ fullPath);
public FileResult (string fullPath);
new Microsoft.Maui.Storage.FileResult : string -> Microsoft.Maui.Storage.FileResult
Public Sub New (fullPath As String)

Parameters

fullPath
String

Full file path to the corresponding file on the filesystem.

Applies to

FileResult(String, String)

Initializes a new instance of the FileResult class from a file path, explicitly specifying the content type.

public:
 FileResult(System::String ^ fullPath, System::String ^ contentType);
public FileResult (string fullPath, string contentType);
new Microsoft.Maui.Storage.FileResult : string * string -> Microsoft.Maui.Storage.FileResult
Public Sub New (fullPath As String, contentType As String)

Parameters

fullPath
String

Full file path to the corresponding file on the filesystem.

contentType
String

Content type (MIME type) of the file (e.g.: image/png).

Applies to