StorageProviderExtensionsTryGetLocalPath Method
Gets the local file system path of the item as a string.
Namespace: Avalonia.Platform.StorageAssembly: Avalonia.Base (in Avalonia.Base.dll) Version: 11.3.999
public static string? TryGetLocalPath(
this IStorageItem item
)
<ExtensionAttribute>
Public Shared Function TryGetLocalPath (
item As IStorageItem
) As String
[<ExtensionAttribute>]
static member TryGetLocalPath :
item : IStorageItem -> string
- item IStorageItem
- Storage folder or file.
StringFull local path to the folder or file if possible, otherwise null.In Visual Basic and C#, you can call this method as an instance method on any object of type
IStorageItem. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Android platform usually uses "content:" virtual file paths
and Browser platform has isolated access without full paths,
so on these platforms this method will return null.