IsolatedStorageFileStream コンストラクター

定義

IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。 IsolatedStorageFileStream を開く唯一の方法は、そのコンストラクターの 1 つを使用することです。

オーバーロード

IsolatedStorageFileStream(String, FileMode)

指定した mode で、path によって指定されたファイルへのアクセスを与える IsolatedStorageFileStream オブジェクトの新しいインスタンスを初期化します。

IsolatedStorageFileStream(String, FileMode, FileAccess)

mode に指定したモードで、path で指定したファイルへの、access に指定した種類のアクセスを提供する、IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

IsolatedStorageFileStream(String, FileMode, IsolatedStorageFile)

mode で指定したモード、isf で指定した IsolatedStorageFile のコンテキストを使用して、path で指定したファイルへのアクセスを提供する IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare)

IsolatedStorageFileStream で指定したモード、path で指定した共有モードを使用して、mode で指定したファイルへの、access で指定した種類のアクセスを提供する share クラスの新しいインスタンスを初期化します。

IsolatedStorageFileStream(String, FileMode, FileAccess, IsolatedStorageFile)

指定されたファイル access により、また isf によって指定された IsolatedStorageFile のコンテキストの中で、指定された mode の中で path によって指定されるファイルへのアクセスを提供して、IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

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

mode で指定したモード、share で指定したファイル共有モード、buffersize で指定したバッファー サイズを使用して、path で指定したファイルへの、access で指定した種類のアクセスを提供する IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

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

mode で指定したモード、share で指定したファイル共有モード、isf で指定した IsolatedStorageFile のコンテキストを使用して、path で指定したファイルへの、access で指定した種類のアクセスを提供する IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

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

IsolatedStorageFileStream で指定したモード、path で指定したファイル共有モード、mode で指定したバッファー サイズ、access で指定した share のコンテキストを使用して、buffersize で指定したファイルへの、IsolatedStorageFile で指定した種類のアクセスを提供する isf クラスの新しいインスタンスを初期化します。

IsolatedStorageFileStream(String, FileMode)

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

指定した mode で、path によって指定されたファイルへのアクセスを与える IsolatedStorageFileStream オブジェクトの新しいインスタンスを初期化します。

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 値のいずれか 1 つ。

例外

path の形式が正しくありません。

pathnull です。

path にディレクトリが存在しません。

ファイルが見つかりませんでした。modeOpen に設定されます。

注釈

使用される分離ストアは、現在実行中のアセンブリの ID と、それが実行されているアプリケーション ドメインの ID によってスコープが設定されます。 このストアは、オブジェクトの IsolatedStorageFileStream 有効期間中のみ開いたままです。 別の分離ストレージ スコープを指定するか、ストアを開いたままにしておく (複数 IsolatedStorageFileStream のオブジェクトを開くことができる) ようにするには、オブジェクトを受け入れるコンストラクターの形式を IsolatedStorageFile 使用します。

パラメーターは mode 、新しいファイルを作成するか、既存のファイルを使用するかなどを示します。

注意事項

特定のカルチャ設定で文字セットをコンパイルし、異なるカルチャ設定で同じ文字を取得すると、文字が解釈できず、例外がスローされる可能性があります。

適用対象

IsolatedStorageFileStream(String, FileMode, FileAccess)

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

mode に指定したモードで、path で指定したファイルへの、access に指定した種類のアクセスを提供する、IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

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 値のいずれか 1 つ。

access
FileAccess

FileAccess 値のビットごとの組み合わせ。

例外

path の形式が正しくありません。

pathnull です。

ファイルが見つかりません。modeOpen に設定されます。

注釈

使用される分離ストアは、現在実行中のアセンブリの ID と、それが実行されているアプリケーション ドメインの ID によってスコープが設定されます。 このストアは、オブジェクトの IsolatedStorageFileStream 有効期間中のみ開いたままです。 別の分離ストレージ スコープを指定するか、ストアを開いたままにしておく (複数 IsolatedStorageFileStream のオブジェクトを開くことができる) ようにするには、オブジェクトを受け入れるコンストラクターの形式を IsolatedStorageFile 使用します。

パラメーターは mode 、新しいファイルを作成するか、既存のファイルを使用するかを示します。 accessパラメーターには、読み取り専用、読み取り/書き込み、書き込み専用が含まれます。

注意事項

特定のカルチャ設定を持つ文字のセットをコンパイルし、異なるカルチャ設定で同じ文字を取得すると、文字が解釈できない可能性があり、例外がスローされる可能性があります。

適用対象

IsolatedStorageFileStream(String, FileMode, IsolatedStorageFile)

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

mode で指定したモード、isf で指定した IsolatedStorageFile のコンテキストを使用して、path で指定したファイルへのアクセスを提供する IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

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 値のいずれか 1 つ。

isf
IsolatedStorageFile

IsolatedStorageFileStream を開くために使用する IsolatedStorageFile

例外

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 、新しいファイルを作成するか、既存のファイルを使用するかなどを示します。

注意事項

特定のカルチャ設定を持つ文字のセットをコンパイルし、異なるカルチャ設定で同じ文字を取得すると、文字が解釈できない可能性があり、例外がスローされる可能性があります。

適用対象

IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare)

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

IsolatedStorageFileStream で指定したモード、path で指定した共有モードを使用して、mode で指定したファイルへの、access で指定した種類のアクセスを提供する 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 値のいずれか 1 つ。

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 と、それが実行されているアプリケーション ドメインの ID によってスコープが設定されます。 このストアは、オブジェクトの IsolatedStorageFileStream 有効期間中のみ開いたままです。 別の分離ストレージ スコープを指定するか、ストアを開いたままにしておく (複数 IsolatedStorageFileStream のオブジェクトを開くことができる) ようにするには、オブジェクトを受け入れるコンストラクターの形式を IsolatedStorageFile 使用します。

注意事項

特定のカルチャ設定で文字セットをコンパイルし、異なるカルチャ設定で同じ文字を取得すると、文字が解釈できず、例外がスローされる可能性があります。

適用対象

IsolatedStorageFileStream(String, FileMode, FileAccess, IsolatedStorageFile)

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

指定されたファイル access により、また isf によって指定された IsolatedStorageFile のコンテキストの中で、指定された mode の中で path によって指定されるファイルへのアクセスを提供して、IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

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 値のいずれか 1 つ。

access
FileAccess

FileAccess 値のビットごとの組み合わせ。

isf
IsolatedStorageFile

IsolatedStorageFileStream を開くために使用する IsolatedStorageFile

例外

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パラメーターには、読み取り専用、読み取り/書き込み、書き込み専用が含まれます。

注意事項

特定のカルチャ設定を持つ文字のセットをコンパイルし、異なるカルチャ設定で同じ文字を取得すると、文字が解釈できない可能性があり、例外がスローされる可能性があります。

適用対象

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

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

mode で指定したモード、share で指定したファイル共有モード、buffersize で指定したバッファー サイズを使用して、path で指定したファイルへの、access で指定した種類のアクセスを提供する IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

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 値のいずれか 1 つ。

access
FileAccess

FileAccess 値のビットごとの組み合わせ。

share
FileShare

FileShare 値のビットごとの組み合わせ。

bufferSize
Int32

FileStream のバッファー サイズ。

例外

path の形式が正しくありません。

pathnull です。

ファイルが見つかりません。modeOpen に設定されます。

注釈

使用される分離ストアは、現在実行中のアセンブリの ID と、それが実行されているアプリケーション ドメインの ID によってスコープが設定されます。 このストアは、オブジェクトの IsolatedStorageFileStream 有効期間中のみ開いたままです。 別の分離ストレージ スコープを指定するか、ストアを開いたままにしておく (複数 IsolatedStorageFileStream のオブジェクトを開くことができる) ようにするには、オブジェクトを受け入れるコンストラクターの形式を IsolatedStorageFile 使用します。

パラメーターは mode 、新しいファイルを作成するか、既存のファイルを使用するかを示します。 accessパラメーターには、読み取り専用、読み取り/書き込み、書き込み専用が含まれます。

注意事項

特定のカルチャ設定を持つ文字のセットをコンパイルし、異なるカルチャ設定で同じ文字を取得すると、文字が解釈できない可能性があり、例外がスローされる可能性があります。

適用対象

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

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

mode で指定したモード、share で指定したファイル共有モード、isf で指定した IsolatedStorageFile のコンテキストを使用して、path で指定したファイルへの、access で指定した種類のアクセスを提供する IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。

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 値のいずれか 1 つ。

access
FileAccess

FileAccess 値のビットごとの組み合わせ。

share
FileShare

FileShare 値のビットごとの組み合わせ。

isf
IsolatedStorageFile

IsolatedStorageFileStream を開くために使用する IsolatedStorageFile

例外

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パラメーターには、読み取り専用、読み取り/書き込み、書き込み専用が含まれます。

注意事項

特定のカルチャ設定を持つ文字のセットをコンパイルし、異なるカルチャ設定で同じ文字を取得すると、文字が解釈できない可能性があり、例外がスローされる可能性があります。

適用対象

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

ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs
ソース:
IsolatedStorageFileStream.cs

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 値のいずれか 1 つ。

access
FileAccess

FileAccess 値のビットごとの組み合わせ。

share
FileShare

FileShare 値のビットごとの組み合わせ。

bufferSize
Int32

FileStream のバッファー サイズ。

isf
IsolatedStorageFile

IsolatedStorageFileStream を開くために使用する IsolatedStorageFile

例外

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パラメーターには、読み取り専用、読み取り/書き込み、書き込み専用が含まれます。

注意事項

特定のカルチャ設定を持つ文字のセットをコンパイルし、異なるカルチャ設定で同じ文字を取得すると、文字が解釈できない可能性があり、例外がスローされる可能性があります。

適用対象