ReadOnlyFile Constructors

Definition

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

file
FileBase

A FileBase instance that will be used to clone.

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).

Applies to