rolevax
rolevax

Reputation: 1690

Qt Android: where is my file if I write to "./myfile.txt"?

I am porting my Qt desktop app to Android. In the desktop version, I will get a myfile.txt in the same folder of the executable file when I write to ./myfile.txt. After I ported it to Android, the app runs smoothly but I cannot find the file anywhere as I'm new to Android...

So where is the file? Is there any concept like pwd for an Android app?

I'm using QFile and QTextStream to generate and write the file.

QFile file;
file.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream stream(&file);
stream << "something";

Thank you!

Upvotes: 1

Views: 1252

Answers (1)

babay
babay

Reputation: 4844

it might be in "application storage".

/data/data/com.example.yourAppPackageName/

or in sd-card application storage

/sdcard/Android/data/com.example.yourAppPackageName/

Upvotes: 2

Related Questions