android - statfs /storage/sdcard0 failed, errno: 13 -


receiving error in logcat illegal argument exception

statfs /storage/sdcard0 failed, errno: 13

my code

public double totalstorage() throws exception {           **stat = new statfs(environment.getexternalstoragedirectory().getpath());**         return ((double) stat.getblocksize()                 * (double) stat.getblockcount());     } 

please help

errno 13 indicates "permission denied", meaning have insufficient privileges.


Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -