如何检测Windows Phone中的IsolatedStorage使用的空间

问题描述 投票:3回答:1

按标题,我怎么能确定在Windows Phone应用程序的使用IsolatedStorage空间?

windows-phone isolatedstorage
1个回答
0
投票

你可以知道可用空间和使用空间。

try
{
    using (var store = IsolatedStorageFile.GetUserStoreForApplication())
    {
        Int64 curAvail = store.AvailableFreeSpace;
        var used = store.Quota - curAvail;
    }
}

catch (IsolatedStorageException)
{
    // TODO: Handle that store could not be accessed.

}
© www.soinside.com 2019 - 2024. All rights reserved.