windows-phone-7windows-phone-8windows-phone-8.1isolatedstorage

Acess file from isolated storage using its full path as URI


I want to use the file in isolated storage using its full path(like URI), I know there is sandboxed api to access isolated storage. But i have to load the images using their paths.

So is it possible ?


Solution

  • I got it like this:

     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.
                }
            }
        }