Further investigations denotes that using*Enviornment.ExternalStorageDirectory.Path *on jellybean return as folder */storage *in place of */mnt/sdcard. *Is it right?
On Sat, Sep 15, 2012 at 6:23 PM, Francesco Colombo < [email protected]> wrote: > Hi, > > I'm developing an app which on the first run it will download a big file > from FTP. Before the download begin, the user is asked where to save the > file. One can use either local or external storage. > When the user select "external storage" the app will use as root the * > Application.Context.ExternalCacheDir.Path* variable. That is! In this way > all content written into this folder *will be deleted* once the app is > removed from the device. > > Here my code to get available storage size: > > *string *external_path = Path.Combine(* > Application.Context.ExternalCacheDir.Path*, "/mypath"); > * > * > *ulong *totalFreeSpace = 0; > *StatFs *stats = *new* Stats(external_path); > totalFreeSpace = (*ulong*)stats.AvailableBlocks * stats.BlocksSize; > > All this stuff is good on Android +2.2. I'm facing a strange behavior ONLY > on JellyBean. It seems that StatFs will return the same available blocks > value for either internal (use* Application.Context.FilesDir.Path *in > place of *Application.Context.ExternalCacheDir* )or external path. > > Anyone can confirm this? Am I missing something? > > thanks > Francesco >
_______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
