File invisible on phone??

Jamsa

Member
Licensed User
Longtime User
I've written a file to the internal storage using this:
File.WriteString(File.DirInternal, "Data.txt", strResult)

and I read data from it at some other part of my code.

All works 100%.

I'm not deleting or renaming it, but if I try to find the file using windows explorer, I can't find it! :BangHead:

Why is that??
 

thedesolatesoul

Expert
Licensed User
Longtime User
I'm not deleting or renaming it, but if I try to find the file using windows explorer, I can't find it! :BangHead:
Because it is in the emulator filesystem, not your windows filesystem.
Have a read of: Files - Basic4android Wiki


If you feel like it you can open a command prompt in windows(locate the adb.exe file in android sdk/platform-tools)
Do:
adb -e shell

cd /data/<yourpackagename>/files
ls
cat Data.txt
 
Upvote 0

Jamsa

Member
Licensed User
Longtime User
Aha. Well that explains it. :D

I'm not using the emulator, but real phones ;)

I guess I'll have to use File.DirRootExternal and then I can see it. Correct? :)
 
Upvote 0
Top