我想使用其完整路径(如URI)在隔离存储中使用该文件,我知道有沙盒api访问隔离存储。但我必须使用他们的路径加载图像。
那有可能吗?
我这样得到了:
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.
}
}
}