【问题标题】:how to get the path of download directory in maui?如何获取maui中下载目录的路径?
【发布时间】:2022-12-14 03:04:26
【问题描述】:
string location = Path.Combine(FileSystem.Current.AppDataDirectory, "Download", "abc.jpg");
image.Source = ImageSource.FromFile(location);

【问题讨论】:

  • 您想要系统下载文件夹,还是应用程序的下载文件夹?
  • 系统下载文件夹

标签: maui


【解决方案1】:

location的下载路径等同于:

视窗:

C:UsersUserAppDataLocalPackages{GUID}_{hash}LocalStateDownload

安卓:

/data/user/0/your_appliactionID/files/Download

iOSmacOS:

返回由 iTunes 和 iCloud 备份的 Library 目录。

官方参考链接:https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/storage/file-system-helpers?tabs=android

【讨论】:

  • 和安卓,ios?
  • @EhabSaber,查看我的更新。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-06-17
  • 2013-11-12
  • 2013-02-02
  • 1970-01-01
  • 1970-01-01
  • 2019-05-14
  • 1970-01-01
相关资源
最近更新 更多