IsolatedStorageFile.Remove 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
격리된 스토리지 범위 및 모든 콘텐츠를 제거합니다.
오버로드
| Name | Description |
|---|---|
| Remove() |
격리된 스토리지 범위 및 모든 콘텐츠를 제거합니다. |
| Remove(IsolatedStorageScope) |
모든 ID에 대해 지정된 격리된 스토리지 범위를 제거합니다. |
Remove()
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
격리된 스토리지 범위 및 모든 콘텐츠를 제거합니다.
public:
override void Remove();
public override void Remove();
override this.Remove : unit -> unit
Public Overrides Sub Remove ()
예외
격리된 저장소는 삭제할 수 없습니다.
예제
다음 코드 예제에서는 해당 내용을 비운 후 격리된 스토리지 파일을 삭제 하는 메서드를 사용 Remove 합니다. 방법: 격리된 스토리지의 저장소 삭제 예제에서는 메서드를 사용하는 방법 Remove 도 보여 줍니다.
String[] dirNames = isoFile.GetDirectoryNames("*");
String[] fileNames = isoFile.GetFileNames("Archive\\*");
// Delete all the files currently in the Archive directory.
if (fileNames.Length > 0)
{
for (int i = 0; i < fileNames.Length; ++i)
{
// Delete the files.
isoFile.DeleteFile("Archive\\" + fileNames[i]);
}
// Confirm that no files remain.
fileNames = isoFile.GetFileNames("Archive\\*");
}
if (dirNames.Length > 0)
{
for (int i = 0; i < dirNames.Length; ++i)
{
// Delete the Archive directory.
}
}
dirNames = isoFile.GetDirectoryNames("*");
isoFile.Remove();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
Dim dirNames As String() = isoFile.GetDirectoryNames("*")
Dim fileNames As String() = isoFile.GetFileNames("*")
Dim name As String
' List directories currently in this Isolated Storage.
If dirNames.Length > 0 Then
For Each name In dirNames
Console.WriteLine("Directory Name: " & name)
Next name
End If
' List the files currently in this Isolated Storage.
' The list represents all users who have personal preferences stored for this application.
If fileNames.Length > 0 Then
For Each name In fileNames
Console.WriteLine("File Name: " & name)
Next name
End If
설명
Caution
이 메서드는 전체 범위와 포함된 모든 디렉터리 및 파일을 취소할 수 없게 제거합니다.
저장소에 있는 디렉터리 또는 파일이 사용 중인 경우 저장소에 대한 제거 시도가 실패하고 저장소가 제거로 표시됩니다. 저장소를 수정하려는 후속 시도는 .를 throw합니다 IsolatedStorageException.
추가 정보
적용 대상
Remove(IsolatedStorageScope)
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
- Source:
- IsolatedStorageFile.cs
모든 ID에 대해 지정된 격리된 스토리지 범위를 제거합니다.
public:
static void Remove(System::IO::IsolatedStorage::IsolatedStorageScope scope);
public static void Remove(System.IO.IsolatedStorage.IsolatedStorageScope scope);
static member Remove : System.IO.IsolatedStorage.IsolatedStorageScope -> unit
Public Shared Sub Remove (scope As IsolatedStorageScope)
매개 변수
- scope
- IsolatedStorageScope
값의 비트 조합입니다 IsolatedStorageScope .
예외
격리된 저장소는 제거할 수 없습니다.
설명
Caution
이 메서드는 전체 범위와 포함된 모든 디렉터리 및 파일을 취소할 수 없게 제거합니다.
저장소에 있는 디렉터리 또는 파일이 사용 중인 경우 저장소에 대한 제거 시도가 실패하고 저장소가 제거로 표시됩니다. 저장소를 수정하려는 후속 시도는 .를 throw합니다 IsolatedStorageException.