特殊文件夹.个人位置 [英] SpecialFolder.Personal location

查看:30
本文介绍了特殊文件夹.个人位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将文件保存到 Xamarin 中的 System.Environment.SpecialFolder.Personal.它似乎成功了,因为我可以立即从文件中提取数据.但是,我无法在手机上浏览和找到此文件.这个专属的 Personal 文件夹到底在哪里?

I am saving a file to System.Environment.SpecialFolder.Personal in Xamarin. It appears to succeed, because I can immediately pull data from the file. However, I cannot browse and find this file on my phone. Where exactly is this exclusive Personal folder?

推荐答案

System.Environment.SpecialFolder.Personal 类型映射到路径 /data/data/[your.package.名称]/文件.这是您的应用程序的私有目录,因此您将无法使用文件浏览器查看这些文件,除非它具有 root 权限.

The System.Environment.SpecialFolder.Personal type maps to the path /data/data/[your.package.name]/files. This is a private directory to your application so you won't be able to see these files using a file browser unless it has root privileges.

您可以通过以下命令通过 adb 检查这些文件:

You can inspect these files through adb through the following commands:

adb shell
run-as your.package.name
cd files

这篇关于特殊文件夹.个人位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆