Winphone 没有直接删除文件夹的接口(因为文件夹不为空是删除不了的),所以要自己实现 public static void DeleteDirectoryRecursively(this IsolatedStorageFile storageFile, String dirName){ String pattern = dirName + @"\*"; String[] files = storageFile.GetFileNames(pattern); foreach (var fName in files) { storageFile.DeleteFile(Path.Combine(dirName, fName)); } String[] dirs = storageFile.GetDirectoryNames(pattern); foreach (var dName in dirs) { DeleteDirectoryRecursively(storageFile, Path.Combine(dirName, dName)); } storageFile.DeleteDirectory(dirName);}
Winphone 删除文件夹IsolatedStorageFile.DeleteDirectory,布布扣,bubuko.com
Winphone 删除文件夹IsolatedStorageFile.DeleteDirectory
原文:http://fanxz.blog.51cto.com/4040922/1538023