简体   繁体   中英

Total Space or Used space on Windows Phone 8.1

I need a way to get Total Space and or Used space on the device using C# on Windows Phone 8.1 WinRT apps.

I was able to get the Free Space on the device using the below piece of code.

var retrivedProperties = await folder.Properties.RetrievePropertiesAsync(new string[] { "System.FreeSpace" });
var dataSize = (UInt64)retrivedProperties["System.FreeSpace"];

I guess we can only get the Freespace from the device using the below code. I researched a lot and gave up and had to live with Freespace

var retrivedProperties = await folder.Properties.RetrievePropertiesAsync(new string[] { "System.FreeSpace" });
var dataSize = (UInt64)retrivedProperties["System.FreeSpace"];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM