调试错误:operation not permitted on isolatedstoragefilestream
我的代码如下:
System.IO.IsolatedStorage.IsolatedStorageFile store = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication();
store.CreateDirectory(this.m_cacheFilePath);
System.IO.IsolatedStorage.IsolatedStorageFileStream file = new System.IO.IsolatedStorage.IsolatedStorageFileStream(this.m_cacheFilePath + "\\a.cfg", System.IO.FileMode.Open, store);
用ise看,this.m_cacheFilePath这个目录已经创建成功,但是执行到System.IO.IsolatedStorage.IsolatedStorageFileStream file = new System.IO.IsolatedStorage.IsolatedStorageFileStream(this.m_cacheFilePath + "\\a.cfg", System.IO.FileMode.Open, store);这里时报异常:operation not permitted on isolatedstoragefilestream
---------------------------------------------------------
用ise看,文件确实没有,
这是怎么回事呢?是因为没有权限打开文件么?
[解决办法]
应该是没有创建吧,用createoropen的参数试试。