ReadOnlyFile 构造函数

定义

重载

ReadOnlyFile(FileBase)

从现有实例初始化 ReadOnlyFile 类的新实例。

ReadOnlyFile(String)

从文件路径初始化类的新实例 ReadOnlyFile

ReadOnlyFile(String, String)

从文件路径初始化类的新实例 ReadOnlyFile ,并显式指定内容类型。

ReadOnlyFile(FileBase)

Source:
FileSystem.shared.cs
Source:
FileSystem.shared.cs

从现有实例初始化 ReadOnlyFile 类的新实例。

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)

参数

file
FileBase

FileBase将用于克隆的实例。

适用于

ReadOnlyFile(String)

Source:
FileSystem.shared.cs
Source:
FileSystem.shared.cs

从文件路径初始化类的新实例 ReadOnlyFile

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)

参数

fullPath
String

文件系统上相应文件的完整文件路径。

适用于

ReadOnlyFile(String, String)

Source:
FileSystem.shared.cs
Source:
FileSystem.shared.cs

从文件路径初始化类的新实例 ReadOnlyFile ,并显式指定内容类型。

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)

参数

fullPath
String

文件系统上相应文件的完整文件路径。

contentType
String

文件的内容类型(MIME 类型),例如: image/png

适用于