提问人:DumbestGuyOnSaturn 提问时间:10/24/2023 更新时间:10/24/2023 访问量:61
MAUI 创建的文件在 Android 设备上的什么位置?
Where are MAUI-created files on the Android device?
问:
从程序代码中,我使用
myfilestreamwriter = new System.IO.StreamWriter(System.IO.Path.Combine(FileSystem.Current.AppDataDirectory, "myprivatefile.txt"));
myfilestreamwriter.WriteLine("some stuff");
myfilestreamwriter.Close();
在上面的 FileSystem.Current.AppDataDirectory 中,值为
/data/user/0/com.mycompanyname.myprojectname/files
创建文件没有问题,我以后可以访问和读取它。
但是,我无法在 Windows 中使用进程 1: 找到该文件夹,在 Android 中使用进程 2: 找不到该文件夹。
1:在 Windows 上的文件资源管理器中浏览到文件
在 Windows 中,
MYANDROIDDEVICE\Internal shared storage\Android\data\
包含一个名为
com.mycompanyname.myprojectname
在该文件夹中,有一个名为
cache
但是没有我创建的文件的迹象。
2:使用Android应用程序列表中浏览到MYANDROIDDEVICE上的文件
Files > Android > data > com.mycompanyname.myprojectname
在该文件夹中,有一个名为
cache
但是没有我创建的文件的迹象。
包含“某些内容”的文件物理存储在哪里?
答: 暂无答案
评论
adb
Where is the file containing “some stuff” physically stored?
好吧,您告诉我们:/data/user/0/com.mycompanyname.myprojectname/files