我想使用完整路径(如URI)在隔离存储中使用该文件,我知道有沙盒api可以访问隔离存储。但我必须使用他们的路径加载图像。
有可能吗?
答案 0 :(得分:0)
我是这样的:
public string GetAbsolutePathOfFile(string filePath)
{
using (var storage = IsolatedStorageFile.GetUserStoreForApplication())
{
using (var isfs = storage.OpenFile(filePath, FileMode.Open, FileAccess.ReadWrite,
FileShare.ReadWrite))
{
return isfs.Name; // this return the absolute path.
}
}
}