IsolatedStorageFileStream 생성자

정의

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화합니다. IsolatedStorageFileStream은 해당 생성자를 통해서만 열 수 있습니다.

오버로드

IsolatedStorageFileStream(String, FileMode)

IsolatedStorageFileStream 개체의 새 인스턴스를 초기화하여 지정된 path에서 mode에 지정된 파일에 액세스할 수 있도록 합니다.

IsolatedStorageFileStream(String, FileMode, FileAccess)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서 요청한 mode 종류를 사용하여 access로 지정된 파일에 액세스할 수 있도록 합니다.

IsolatedStorageFileStream(String, FileMode, IsolatedStorageFile)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, mode로 지정된 IsolatedStorageFile 컨텍스트를 사용하여 isf로 지정된 파일에 액세스할 수 있도록 합니다.

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 modeaccess에 지정된 파일 공유 모드를 사용하여 share에 지정된 파일에 액세스할 수 있도록 합니다.

IsolatedStorageFileStream(String, FileMode, FileAccess, IsolatedStorageFile)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 mode, access에 지정된 IsolatedStorageFile 컨텍스트 등을 사용하여 isf에 지정된 파일에 액세스할 수 있도록 합니다.

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, Int32)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 mode, access로 지정된 파일 공유 모드, 지정된 share를 사용하여 buffersize로 지정된 파일에 액세스할 수 있도록 합니다.

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 mode, access에 지정된 파일 공유 모드, share에 지정된 IsolatedStorageFile 컨텍스트를 사용하여 isf에 지정된 파일에 액세스할 수 있도록 합니다.

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, Int32, IsolatedStorageFile)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 mode, access로 지정된 파일 공유 모드, 지정된 share, buffersize로 지정된 IsolatedStorageFile 컨텍스트를 사용하여 isf로 지정된 파일에 액세스할 수 있도록 합니다.

IsolatedStorageFileStream(String, FileMode)

IsolatedStorageFileStream 개체의 새 인스턴스를 초기화하여 지정된 path에서 mode에 지정된 파일에 액세스할 수 있도록 합니다.

public:
 IsolatedStorageFileStream(System::String ^ path, System::IO::FileMode mode);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode);
new System.IO.IsolatedStorage.IsolatedStorageFileStream : string * System.IO.FileMode -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Sub New (path As String, mode As FileMode)

매개 변수

path
String

격리된 스토리지 내 파일의 상대 경로입니다.

mode
FileMode

FileMode 값 중 하나입니다.

예외

path의 형식이 잘못된 경우

pathnull인 경우

path에 디렉터리가 없는 경우

파일을 찾을 수 없고 modeOpen으로 설정되어 있는 경우

설명

사용 되는 격리 된 저장소는 현재 실행 중인 어셈블리의 id 및 실행 되는 애플리케이션 도메인으로 범위가 지정 됩니다. 이 저장소는 개체의 IsolatedStorageFileStream 수명 동안만 열린 상태로 유지됩니다. 다른 격리된 스토리지 범위를 지정하거나 저장소가 열린 상태를 유지하도록 허용하려면(그래서 여러 IsolatedStorageFileStream 개체를 열 수 있음), IsolatedStorageFile 개체를 수락하는 생성자의 형식을 사용합니다.

매개 변수는 mode 새 파일을 만들어야 하는지 여부, 사용된 기존 파일 등을 나타냅니다.

주의

특정 문화권 설정을 사용하여 문자 집합을 컴파일하고 다른 문화권 설정으로 동일한 문자를 검색하는 경우 문자를 해석할 수 없으며 예외가 throw될 수 있습니다.

적용 대상

IsolatedStorageFileStream(String, FileMode, FileAccess)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서 요청한 mode 종류를 사용하여 access로 지정된 파일에 액세스할 수 있도록 합니다.

public:
 IsolatedStorageFileStream(System::String ^ path, System::IO::FileMode mode, System::IO::FileAccess access);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access);
new System.IO.IsolatedStorage.IsolatedStorageFileStream : string * System.IO.FileMode * System.IO.FileAccess -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Sub New (path As String, mode As FileMode, access As FileAccess)

매개 변수

path
String

격리된 스토리지 내 파일의 상대 경로입니다.

mode
FileMode

FileMode 값 중 하나입니다.

access
FileAccess

FileAccess 값의 비트 조합입니다.

예외

path의 형식이 잘못된 경우

pathnull인 경우

파일을 찾을 수 없고 modeOpen으로 설정되어 있는 경우

설명

사용 되는 격리 된 저장소는 현재 실행 중인 어셈블리의 id 및 실행 되는 애플리케이션 도메인으로 범위가 지정 됩니다. 이 저장소는 개체의 IsolatedStorageFileStream 수명 동안만 열린 상태로 유지됩니다. 다른 격리된 스토리지 범위를 지정하거나 저장소가 열린 상태를 유지하도록 허용하려면(그래서 여러 IsolatedStorageFileStream 개체를 열 수 있음), IsolatedStorageFile 개체를 수락하는 생성자의 형식을 사용합니다.

매개 변수는 mode 새 파일을 만들어야 하는지 아니면 기존 파일을 사용해야 하는지를 나타냅니다. 매개 변수에는 access 읽기 전용, 읽기/쓰기 및 쓰기 전용이 포함됩니다.

주의

특정 문화권 설정을 사용하여 문자 집합을 컴파일하고 다른 문화권 설정으로 동일한 문자를 검색하는 경우 문자를 해석할 수 없으며 예외가 throw될 수 있습니다.

적용 대상

IsolatedStorageFileStream(String, FileMode, IsolatedStorageFile)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, mode로 지정된 IsolatedStorageFile 컨텍스트를 사용하여 isf로 지정된 파일에 액세스할 수 있도록 합니다.

public:
 IsolatedStorageFileStream(System::String ^ path, System::IO::FileMode mode, System::IO::IsolatedStorage::IsolatedStorageFile ^ isf);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.IsolatedStorage.IsolatedStorageFile isf);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.IsolatedStorage.IsolatedStorageFile? isf);
new System.IO.IsolatedStorage.IsolatedStorageFileStream : string * System.IO.FileMode * System.IO.IsolatedStorage.IsolatedStorageFile -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Sub New (path As String, mode As FileMode, isf As IsolatedStorageFile)

매개 변수

path
String

격리된 스토리지 내 파일의 상대 경로입니다.

mode
FileMode

FileMode 값 중 하나입니다.

예외

path의 형식이 잘못된 경우

pathnull인 경우

파일을 찾을 수 없고 modeOpen으로 설정되어 있는 경우

isf 에 할당량이 없습니다.

예제

다음 코드 예제에서는이 생성자를 사용 하는 방법을 보여 줍니다. 이 예제의 전체 컨텍스트는 개요를 참조하세요 IsolatedStorageFileStream .

// This is the stream to which data will be written.
IsolatedStorageFileStream^ source = gcnew IsolatedStorageFileStream( this->userName,FileMode::OpenOrCreate,isoFile );

// This is the stream from which data will be read.
Console::WriteLine( "Is the source file readable?  {0}", (source->CanRead ? (String^)"true" : "false") );
Console::WriteLine( "Creating new IsolatedStorageFileStream for Archive." );

// Open or create a writable file.
IsolatedStorageFileStream^ target = gcnew IsolatedStorageFileStream( String::Concat("Archive\\",this->userName),FileMode::OpenOrCreate,FileAccess::Write,FileShare::Write,isoFile );

IsolatedStorageFileStream source =
    new IsolatedStorageFileStream(this.userName, FileMode.OpenOrCreate,
    isoFile);
// This is the stream from which data will be read.
Console.WriteLine("Is the source file readable? " + (source.CanRead ? "true" : "false"));
Console.WriteLine("Creating new IsolatedStorageFileStream for Archive.");

// Open or create a writable file.
IsolatedStorageFileStream target =
    new IsolatedStorageFileStream("Archive\\ " + this.userName,
    FileMode.OpenOrCreate,
    FileAccess.Write,
    FileShare.Write,
    isoFile);
' Open or create a writable file.
Dim target As New IsolatedStorageFileStream("Archive\ " & Me.userName, _
     FileMode.OpenOrCreate, FileAccess.Write, FileShare.Write, isoFile)

설명

매개 변수는 mode 새 파일을 만들어야 하는지 여부, 사용된 기존 파일 등을 나타냅니다.

주의

특정 문화권 설정을 사용하여 문자 집합을 컴파일하고 다른 문화권 설정으로 동일한 문자를 검색하는 경우 문자를 해석할 수 없으며 예외가 throw될 수 있습니다.

적용 대상

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 modeaccess에 지정된 파일 공유 모드를 사용하여 share에 지정된 파일에 액세스할 수 있도록 합니다.

public:
 IsolatedStorageFileStream(System::String ^ path, System::IO::FileMode mode, System::IO::FileAccess access, System::IO::FileShare share);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share);
new System.IO.IsolatedStorage.IsolatedStorageFileStream : string * System.IO.FileMode * System.IO.FileAccess * System.IO.FileShare -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Sub New (path As String, mode As FileMode, access As FileAccess, share As FileShare)

매개 변수

path
String

격리된 스토리지 내 파일의 상대 경로입니다.

mode
FileMode

FileMode 값 중 하나입니다.

access
FileAccess

FileAccess 값의 비트 조합입니다.

share
FileShare

FileShare 값의 비트 조합입니다.

예외

path의 형식이 잘못된 경우

pathnull인 경우

파일을 찾을 수 없고 modeOpen으로 설정되어 있는 경우

예제

다음 코드 예제에서는이 생성자를 사용 하는 방법을 보여 줍니다. 이 예제의 전체 컨텍스트는 개요를 참조하세요 IsolatedStorageFileStream .

// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile^ isoFile = IsolatedStorageFile::GetStore( static_cast<IsolatedStorageScope>(IsolatedStorageScope::User | IsolatedStorageScope::Assembly | IsolatedStorageScope::Domain), (Type^)nullptr, nullptr );
IsolatedStorageFileStream^ isoStream = gcnew IsolatedStorageFileStream( this->userName,FileMode::Open,FileAccess::ReadWrite,isoFile );

// Retrieve an IsolatedStorageFile for the current Domain and Assembly.
IsolatedStorageFile isoFile =
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
    IsolatedStorageScope.Assembly |
    IsolatedStorageScope.Domain,
    null,
    null);

IsolatedStorageFileStream isoStream =
    new IsolatedStorageFileStream("substituteUsername",
    System.IO.FileMode.Open,
    System.IO.FileAccess.Read,
     System.IO.FileShare.Read);
' Retrieve an IsolatedStorageFile for the current Domain and Assembly.
Dim isoFile As IsolatedStorageFile = _
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User _
    Or IsolatedStorageScope.Assembly _
    Or IsolatedStorageScope.Domain, Nothing, Nothing)

Dim isoStream As New IsolatedStorageFileStream("substituteUsername", System.IO.FileMode.Open, _
    System.IO.FileAccess.Read, System.IO.FileShare.Read)

설명

사용 되는 격리 된 저장소는 현재 실행 중인 어셈블리의 id 및 실행 되는 애플리케이션 도메인으로 범위가 지정 됩니다. 이 저장소는 개체의 IsolatedStorageFileStream 수명 동안만 열린 상태로 유지됩니다. 다른 격리된 스토리지 범위를 지정하거나 저장소가 열린 상태를 유지하도록 허용하려면(그래서 여러 IsolatedStorageFileStream 개체를 열 수 있음), IsolatedStorageFile 개체를 수락하는 생성자의 형식을 사용합니다.

주의

특정 문화권 설정을 사용하여 문자 집합을 컴파일하고 다른 문화권 설정으로 동일한 문자를 검색하는 경우 문자를 해석할 수 없으며 예외가 throw될 수 있습니다.

적용 대상

IsolatedStorageFileStream(String, FileMode, FileAccess, IsolatedStorageFile)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 mode, access에 지정된 IsolatedStorageFile 컨텍스트 등을 사용하여 isf에 지정된 파일에 액세스할 수 있도록 합니다.

public:
 IsolatedStorageFileStream(System::String ^ path, System::IO::FileMode mode, System::IO::FileAccess access, System::IO::IsolatedStorage::IsolatedStorageFile ^ isf);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.IsolatedStorage.IsolatedStorageFile isf);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.IsolatedStorage.IsolatedStorageFile? isf);
new System.IO.IsolatedStorage.IsolatedStorageFileStream : string * System.IO.FileMode * System.IO.FileAccess * System.IO.IsolatedStorage.IsolatedStorageFile -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Sub New (path As String, mode As FileMode, access As FileAccess, isf As IsolatedStorageFile)

매개 변수

path
String

격리된 스토리지 내 파일의 상대 경로입니다.

mode
FileMode

FileMode 값 중 하나입니다.

access
FileAccess

FileAccess 값의 비트 조합입니다.

예외

path의 형식이 잘못된 경우

pathnull인 경우

격리된 저장소가 닫혀 있습니다.

파일을 찾을 수 없고 modeOpen으로 설정되어 있는 경우

isf 에 할당량이 없습니다.

예제

다음 코드 예제에서는이 생성자를 사용 하는 방법을 보여 줍니다. 이 예제의 전체 컨텍스트는 개요를 참조하세요 IsolatedStorageFileStream .

IsolatedStorageFile^ isoFile;
isoFile = IsolatedStorageFile::GetUserStoreForDomain();

// Open or create a writable file.
IsolatedStorageFileStream^ isoStream = gcnew IsolatedStorageFileStream( this->userName,FileMode::OpenOrCreate,FileAccess::Write,isoFile );
StreamWriter^ writer = gcnew StreamWriter( isoStream );
writer->WriteLine( this->NewsUrl );
writer->WriteLine( this->SportsUrl );

// Calculate the amount of space used to record the user's preferences.
double d = isoFile->CurrentSize / isoFile->MaximumSize;
Console::WriteLine( "CurrentSize = {0}", isoFile->CurrentSize.ToString() );
Console::WriteLine( "MaximumSize = {0}", isoFile->MaximumSize.ToString() );
writer->Close();
isoFile->Close();
isoStream->Close();
return d;
IsolatedStorageFile isoFile;
isoFile = IsolatedStorageFile.GetUserStoreForDomain();

// Open or create a writable file.
IsolatedStorageFileStream isoStream =
    new IsolatedStorageFileStream(this.userName,
    FileMode.OpenOrCreate,
    FileAccess.Write,
    isoFile);

StreamWriter writer = new StreamWriter(isoStream);
writer.WriteLine(this.NewsUrl);
writer.WriteLine(this.SportsUrl);
// Calculate the amount of space used to record the user's preferences.
double d = isoFile.CurrentSize / isoFile.MaximumSize;
Console.WriteLine("CurrentSize = " + isoFile.CurrentSize.ToString());
Console.WriteLine("MaximumSize = " + isoFile.MaximumSize.ToString());
// StreamWriter.Close implicitly closes isoStream.
writer.Close();
isoFile.Dispose();
isoFile.Close();
return d;
Dim isoFile As IsolatedStorageFile
isoFile = IsolatedStorageFile.GetUserStoreForDomain()

' Open or create a writable file.
Dim isoStream As New IsolatedStorageFileStream(Me.userName, FileMode.OpenOrCreate, _
    FileAccess.Write, isoFile)

Dim writer As New StreamWriter(isoStream)
writer.WriteLine(Me.NewsUrl)
writer.WriteLine(Me.SportsUrl)
' Calculate the amount of space used to record the user's preferences.
Dim d As Double = Convert.ToDouble(isoFile.CurrentSize) / Convert.ToDouble(isoFile.MaximumSize)
Console.WriteLine(("CurrentSize = " & isoFile.CurrentSize.ToString()))
Console.WriteLine(("MaximumSize = " & isoFile.MaximumSize.ToString()))
' StreamWriter.Close implicitly closes isoStream.
writer.Close()
isoFile.Dispose()
isoFile.Close()
Return d

설명

매개 변수는 mode 새 파일을 만들어야 하는지 아니면 기존 파일을 사용해야 하는지를 나타냅니다. 매개 변수에는 access 읽기 전용, 읽기/쓰기 및 쓰기 전용이 포함됩니다.

주의

특정 문화권 설정을 사용하여 문자 집합을 컴파일하고 다른 문화권 설정으로 동일한 문자를 검색하는 경우 문자를 해석할 수 없으며 예외가 throw될 수 있습니다.

적용 대상

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, Int32)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 mode, access로 지정된 파일 공유 모드, 지정된 share를 사용하여 buffersize로 지정된 파일에 액세스할 수 있도록 합니다.

public:
 IsolatedStorageFileStream(System::String ^ path, System::IO::FileMode mode, System::IO::FileAccess access, System::IO::FileShare share, int bufferSize);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize);
new System.IO.IsolatedStorage.IsolatedStorageFileStream : string * System.IO.FileMode * System.IO.FileAccess * System.IO.FileShare * int -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Sub New (path As String, mode As FileMode, access As FileAccess, share As FileShare, bufferSize As Integer)

매개 변수

path
String

격리된 스토리지 내 파일의 상대 경로입니다.

mode
FileMode

FileMode 값 중 하나입니다.

access
FileAccess

FileAccess 값의 비트 조합입니다.

share
FileShare

FileShare 값의 비트 조합입니다.

bufferSize
Int32

FileStream 버퍼 크기입니다.

예외

path의 형식이 잘못된 경우

pathnull인 경우

파일을 찾을 수 없고 modeOpen으로 설정되어 있는 경우

설명

사용 되는 격리 된 저장소는 현재 실행 중인 어셈블리의 id 및 실행 되는 애플리케이션 도메인으로 범위가 지정 됩니다. 이 저장소는 개체의 IsolatedStorageFileStream 수명 동안만 열린 상태로 유지됩니다. 다른 격리된 스토리지 범위를 지정하거나 저장소가 열린 상태를 유지하도록 허용하려면(그래서 여러 IsolatedStorageFileStream 개체를 열 수 있음), IsolatedStorageFile 개체를 수락하는 생성자의 형식을 사용합니다.

매개 변수는 mode 새 파일을 만들어야 하는지 아니면 기존 파일을 사용해야 하는지를 나타냅니다. 매개 변수에는 access 읽기 전용, 읽기/쓰기 및 쓰기 전용이 포함됩니다.

주의

특정 문화권 설정을 사용하여 문자 집합을 컴파일하고 다른 문화권 설정으로 동일한 문자를 검색하는 경우 문자를 해석할 수 없으며 예외가 throw될 수 있습니다.

적용 대상

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 mode, access에 지정된 파일 공유 모드, share에 지정된 IsolatedStorageFile 컨텍스트를 사용하여 isf에 지정된 파일에 액세스할 수 있도록 합니다.

public:
 IsolatedStorageFileStream(System::String ^ path, System::IO::FileMode mode, System::IO::FileAccess access, System::IO::FileShare share, System::IO::IsolatedStorage::IsolatedStorageFile ^ isf);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.IO.IsolatedStorage.IsolatedStorageFile isf);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.IO.IsolatedStorage.IsolatedStorageFile? isf);
new System.IO.IsolatedStorage.IsolatedStorageFileStream : string * System.IO.FileMode * System.IO.FileAccess * System.IO.FileShare * System.IO.IsolatedStorage.IsolatedStorageFile -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Sub New (path As String, mode As FileMode, access As FileAccess, share As FileShare, isf As IsolatedStorageFile)

매개 변수

path
String

격리된 스토리지 내 파일의 상대 경로입니다.

mode
FileMode

FileMode 값 중 하나입니다.

access
FileAccess

FileAccess 값의 비트 조합입니다.

share
FileShare

FileShare 값의 비트 조합입니다.

예외

path의 형식이 잘못된 경우

pathnull인 경우

파일을 찾을 수 없고 modeOpen으로 설정되어 있는 경우

isf 에 할당량이 없습니다.

예제

다음 코드 예제에서는이 생성자를 사용 하는 방법을 보여 줍니다. 이 예제의 전체 컨텍스트는 개요를 참조하세요 IsolatedStorageFileStream .

// This is the stream to which data will be written.
IsolatedStorageFileStream^ source = gcnew IsolatedStorageFileStream( this->userName,FileMode::OpenOrCreate,isoFile );

// This is the stream from which data will be read.
Console::WriteLine( "Is the source file readable?  {0}", (source->CanRead ? (String^)"true" : "false") );
Console::WriteLine( "Creating new IsolatedStorageFileStream for Archive." );

// Open or create a writable file.
IsolatedStorageFileStream^ target = gcnew IsolatedStorageFileStream( String::Concat("Archive\\",this->userName),FileMode::OpenOrCreate,FileAccess::Write,FileShare::Write,isoFile );

IsolatedStorageFileStream source =
    new IsolatedStorageFileStream(this.userName, FileMode.OpenOrCreate,
    isoFile);
// This is the stream from which data will be read.
Console.WriteLine("Is the source file readable? " + (source.CanRead ? "true" : "false"));
Console.WriteLine("Creating new IsolatedStorageFileStream for Archive.");

// Open or create a writable file.
IsolatedStorageFileStream target =
    new IsolatedStorageFileStream("Archive\\ " + this.userName,
    FileMode.OpenOrCreate,
    FileAccess.Write,
    FileShare.Write,
    isoFile);
' Open or create a writable file.
Dim target As New IsolatedStorageFileStream("Archive\ " & Me.userName, _
     FileMode.OpenOrCreate, FileAccess.Write, FileShare.Write, isoFile)

설명

매개 변수는 mode 새 파일을 만들어야 하는지 또는 기존 파일을 사용해야 하는지를 나타냅니다. 매개 변수에는 access 읽기 전용, 읽기/쓰기 및 쓰기 전용이 포함됩니다.

주의

특정 문화권 설정을 사용하여 문자 집합을 컴파일하고 다른 문화권 설정으로 동일한 문자를 검색하는 경우 문자를 해석할 수 없으며 예외가 throw될 수 있습니다.

적용 대상

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, Int32, IsolatedStorageFile)

IsolatedStorageFileStream 클래스의 새 인스턴스를 초기화하여 지정된 path에서, 지정된 파일 mode, access로 지정된 파일 공유 모드, 지정된 share, buffersize로 지정된 IsolatedStorageFile 컨텍스트를 사용하여 isf로 지정된 파일에 액세스할 수 있도록 합니다.

public:
 IsolatedStorageFileStream(System::String ^ path, System::IO::FileMode mode, System::IO::FileAccess access, System::IO::FileShare share, int bufferSize, System::IO::IsolatedStorage::IsolatedStorageFile ^ isf);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile? isf);
public IsolatedStorageFileStream (string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize, System.IO.IsolatedStorage.IsolatedStorageFile isf);
new System.IO.IsolatedStorage.IsolatedStorageFileStream : string * System.IO.FileMode * System.IO.FileAccess * System.IO.FileShare * int * System.IO.IsolatedStorage.IsolatedStorageFile -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Sub New (path As String, mode As FileMode, access As FileAccess, share As FileShare, bufferSize As Integer, isf As IsolatedStorageFile)

매개 변수

path
String

격리된 스토리지 내 파일의 상대 경로입니다.

mode
FileMode

FileMode 값 중 하나입니다.

access
FileAccess

FileAccess 값의 비트 조합입니다.

share
FileShare

FileShare 값의 비트 조합입니다.

bufferSize
Int32

FileStream 버퍼 크기입니다.

예외

path의 형식이 잘못된 경우

pathnull인 경우

파일을 찾을 수 없고 modeOpen으로 설정되어 있는 경우

isf 에 할당량이 없습니다.

예제

다음 코드 예제에서는이 생성자를 사용 하는 방법을 보여 줍니다. 이 예제의 전체 컨텍스트는 개요를 참조하세요 IsolatedStorageFileStream .

// Open or create a writable file, no larger than 10k
IsolatedStorageFileStream^ isoStream = gcnew IsolatedStorageFileStream( this->userName,FileMode::OpenOrCreate,FileAccess::Write,FileShare::Write,10240,isoFile );

// Open or create a writable file with a maximum size of 10K.
IsolatedStorageFileStream isoStream =
    new IsolatedStorageFileStream(this.userName,
    FileMode.OpenOrCreate,
    FileAccess.Write,
    FileShare.Write,
    10240,
    isoFile);
' Open or create a writable file with a maximum size of 10K.
Dim isoStream As New IsolatedStorageFileStream(Me.userName, FileMode.OpenOrCreate, _
    FileAccess.Write, FileShare.Write, 10240, isoFile)

설명

매개 변수는 mode 새 파일을 만들어야 하는지 또는 기존 파일을 사용해야 하는지를 나타냅니다. 매개 변수에는 access 읽기 전용, 읽기/쓰기 및 쓰기 전용이 포함됩니다.

주의

특정 문화권 설정을 사용하여 문자 집합을 컴파일하고 다른 문화권 설정으로 동일한 문자를 검색하는 경우 문자를 해석할 수 없으며 예외가 throw될 수 있습니다.

적용 대상