如何以编程方式获取Universal Windows Phone 10中的可用空间,因为UWP 10中不存在AvailableFreeSpace
属性
public long GetFreeSize()
{
using (var isolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication())
{
var sizeInBytes = isolatedStorageFile.AvailableFreeSpace;//this AvailableFreeSpace proprrty doesnt exist in uwp
var sizeInKB = sizeInBytes / 1024.0;
var sizeInMB = sizeInKB / 1024.0;
var sizeInGB = sizeInMB / 1024.0;
}
return (long)0;
}