简体   繁体   中英

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?

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"];
    }

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