StorageFile.Path 属性

定义

如果文件具有路径,则获取当前文件的完整文件系统路径。

public:
 property Platform::String ^ Path { Platform::String ^ get(); };
winrt::hstring Path();
public string Path { get; }
var string = storageFile.path;
Public ReadOnly Property Path As String

属性值

String

Platform::String

winrt::hstring

文件的完整路径(如果文件在用户的文件系统中具有路径)。

实现

注解

不要依赖此属性来访问文件,因为某些文件可能没有文件系统路径。 例如,如果文件由 URI 提供支持,或使用文件选取器进行选取,则不保证该文件具有文件系统路径。

适用于