Hello,
I am newbie in Android world. I have created simple application which enumerates the files in the android device. In the my emulator (file explorer) there is folder named "Data". I unable to enumerate this folder. I simply called listFiles() method.
Following is the code. It is showing logs as listFiles failed. But when I tried to get the files under the /data/anr folder, I am getting it.
I didn't understood such behaviour.
String m_file_test = "/data";
File m_file_list[] = m_file_test.listFiles();
if (null == m_file_list)
{
Log.i("Fail", "listFiles failed");
return;
}
int iTotal = m_file_list.length;
for (iCnt = 0; iCnt < iTotal; ++iCnt)
{
Log.i("File Found = ", m_file_list[iCnt].getAbsolutePath());
}
Thanks.
I am newbie in Android world. I have created simple application which enumerates the files in the android device. In the my emulator (file explorer) there is folder named "Data". I unable to enumerate this folder. I simply called listFiles() method.
Following is the code. It is showing logs as listFiles failed. But when I tried to get the files under the /data/anr folder, I am getting it.
I didn't understood such behaviour.
String m_file_test = "/data";
File m_file_list[] = m_file_test.listFiles();
if (null == m_file_list)
{
Log.i("Fail", "listFiles failed");
return;
}
int iTotal = m_file_list.length;
for (iCnt = 0; iCnt < iTotal; ++iCnt)
{
Log.i("File Found = ", m_file_list[iCnt].getAbsolutePath());
}
Thanks.