I have a problem getting the size of a file. I have the following code:
File file = new File("/sdcard/lala.txt");
long length = file.length();
And always length is zero, yes zero.
I am using Android SDK (not sure what version), the code is running inside an Activity, I have created an sdcard.
Perhaps it is a permission issue? Is there anything I am missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…