1
我正在創建一個應用程序,它創建一個文本文件並將該文件存儲在隔離存儲中。如何將文件從獨立存儲複製到手機存儲WP8?
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();
我需要將存儲在獨立存儲中的文件移動到手機存儲。如何在Windows Phone 8應用程序中實現這一點?