简体   繁体   English

获取 Windows phone 8.1 中的可用存储空间

[英]Fetching available storage space in Windows phone 8.1

Is there an API to get the available storage space on the phone in WP8.1 SDK? WP8.1 SDK中是否有获取手机可用存储空间的API?

I am not talking about app local storage but phones storage.我不是在谈论应用程序本地存储,而是在谈论手机存储。

You can get how many free space your application has in his local folder.您可以获取您的应用程序在他的本地文件夹中有多少可用空间。

public async Task<UInt64> GetLocalFolderFreeSpaceAsync()
    {
        var retrivedProperties =
            await ApplicationData.Current.LocalFolder.Properties.RetrievePropertiesAsync(new string[] {"System.FreeSpace"});
        return (UInt64) retrivedProperties["System.FreeSpace"];
    }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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