本文介绍了如何将文件从隔离存储复制到手机存储WP8?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个创建文本文件并将该文件存储在Isolated Storage中的应用程序。             



 

 if(!myFile.FileExists(sFile))
{
IsolatedStorageFileStream dataFile = myFile.CreateFile(sFile);
dataFile.Close();
}
StreamReader reader = new StreamReader(new IsolatedStorageFileStream(sFile,FileMode.Open,myFile));
string rawData = reader.ReadToEnd();
reader.Close();

StreamWriter sw = new StreamWriter(new IsolatedStorageFileStream(sFile,FileMode.Append,myFile));
string [] hello = new string [] {" av"," vd"," dbg" };
for(int i = 0; i< hello.Length; i ++)
{
sw.WriteLine(hello [i]);
}
sw.Close();




$
  &NBSP; &NBSP; &NBSP; &NBSP;   

我需要将存储在隔离存储中的文件移动到手机存储中。如何在Windows Phone 8应用程序中实现此目的?

解决方案

I was creating an application which creates a text file and storing that file in Isolated Storage.             

 

 if (!myFile.FileExists(sFile))
            {
                IsolatedStorageFileStream dataFile = myFile.CreateFile(sFile);
                dataFile.Close();
            }
            StreamReader reader = new StreamReader(new IsolatedStorageFileStream(sFile, FileMode.Open, myFile));
            string rawData = reader.ReadToEnd();
            reader.Close();

            StreamWriter sw = new StreamWriter(new IsolatedStorageFileStream(sFile, FileMode.Append, myFile));
            string[] hello = new string[] { "av", "vd", "dbg" };
            for (int i = 0; i < hello.Length; i++)
            {
                sw.WriteLine(hello[i]);
            }
            sw.Close();



            
I need to move that file stored in Isolated Storage to the Phone Storage. How to achieve this in Windows Phone 8 application?

解决方案


这篇关于如何将文件从隔离存储复制到手机存储WP8?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 05:08