2014-11-06 5 views
0

격리 된 저장소에서 파일을 삭제하려고 할 때 오류가 발생합니다. 내 코드를 아래에서 찾으십시오.deletefile 함수를 호출 할 때 System.IO.IsolatedStorage.IsolatedStorageException이 발생했습니다.

using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication()) 
          { 
           if (store.FileExists("LatestZipData.zip")) 
           { 
            //Error appearing on below line 
            store.DeleteFile("LatestZipData.zip"); 
           } 
          } 

누구든지 문제를 제안하십시오.

파일이 다른 곳의 코드에서 열려 있다고 생각합니다. 파일이 열려 있으면 어떻게 삭제할 수 있습니까?

감사합니다.

답변

0

나는 오류를 해결했습니다. 코드가 어딘가에으로 열었습니다. 다음 코드는 나를 도왔습니다.

IsolatedStorageFileStream latestZipStreamData = new IsolatedStorageFileStream("LatestZipData.zip", 
            FileMode.Open, FileAccess.ReadWrite, 
            IsolatedStorageFile.GetUserStoreForApplication()); 
     Stream stream=Zipdecryption.decryptisolatedstoragezip(latestZipStreamData); 
     latestZipStreamData.Close(); 
     return(stream); 

감사

:-) 일부를 도움이되기를 바랍니다
관련 문제