FileResult Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
- Source:
- FileSystem.shared.cs
- Source:
- FileSystem.shared.cs
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
Applies to
FileResult(String)
- Source:
- FileSystem.shared.cs
- Source:
- FileSystem.shared.cs
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)
- Source:
- FileSystem.shared.cs
- Source:
- FileSystem.shared.cs
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
).