ReadOnlyFile 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
ReadOnlyFile(FileBase) |
Initializes a new instance of the ReadOnlyFile class from an existing instance. |
ReadOnlyFile(String) |
Initializes a new instance of the ReadOnlyFile class from a file path. |
ReadOnlyFile(String, String) |
Initializes a new instance of the ReadOnlyFile class from a file path, explicitly specifying the content type. |
ReadOnlyFile(FileBase)
- Source:
- FileSystem.shared.cs
- Source:
- FileSystem.shared.cs
Initializes a new instance of the ReadOnlyFile class from an existing instance.
public:
ReadOnlyFile(Microsoft::Maui::Storage::FileBase ^ file);
public ReadOnlyFile (Microsoft.Maui.Storage.FileBase file);
new Microsoft.Maui.Storage.ReadOnlyFile : Microsoft.Maui.Storage.FileBase -> Microsoft.Maui.Storage.ReadOnlyFile
Public Sub New (file As FileBase)
Parameters
Applies to
ReadOnlyFile(String)
- Source:
- FileSystem.shared.cs
- Source:
- FileSystem.shared.cs
Initializes a new instance of the ReadOnlyFile class from a file path.
public:
ReadOnlyFile(System::String ^ fullPath);
public ReadOnlyFile (string fullPath);
new Microsoft.Maui.Storage.ReadOnlyFile : string -> Microsoft.Maui.Storage.ReadOnlyFile
Public Sub New (fullPath As String)
Parameters
- fullPath
- String
Full file path to the corresponding file on the filesystem.
Applies to
ReadOnlyFile(String, String)
- Source:
- FileSystem.shared.cs
- Source:
- FileSystem.shared.cs
Initializes a new instance of the ReadOnlyFile class from a file path, explicitly specifying the content type.
public:
ReadOnlyFile(System::String ^ fullPath, System::String ^ contentType);
public ReadOnlyFile (string fullPath, string contentType);
new Microsoft.Maui.Storage.ReadOnlyFile : string * string -> Microsoft.Maui.Storage.ReadOnlyFile
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
).