IsolatedStorageFileStream コンストラクタ (String, FileMode)
アセンブリ: mscorlib (mscorlib.dll 内)



使用する分離ストアのスコープは、現在実行されているアセンブリの ID と、このアセンブリを実行しているアプリケーション ドメインの ID によって指定されます。このストアは、IsolatedStorageFileStream オブジェクトの有効期間の間だけ開かれたままになります。別の分離ストレージ スコープを指定するか、ストアを開いたままにすることで、複数の IsolatedStorageFileStream オブジェクトを開くことができるようにする場合は、IsolatedStorageFile オブジェクトを扱える形式のコンストラクタを使用します。
mode パラメータは、新しいファイルを作成するか、既存のファイルを使用するかなどを示します。
![]() |
---|
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が解釈されないことがあります。さらに、例外がスローされることもあります。 |


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


IsolatedStorageFileStream コンストラクタ (String, FileMode, IsolatedStorageFile)
アセンブリ: mscorlib (mscorlib.dll 内)

Dim path As String Dim mode As FileMode Dim isf As IsolatedStorageFile Dim instance As New IsolatedStorageFileStream(path, mode, isf)
public function IsolatedStorageFileStream ( path : String, mode : FileMode, isf : IsolatedStorageFile )


mode パラメータは、新しいファイルを作成するか、既存のファイルを使用するかなどを示します。
![]() |
---|
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が正しく解釈されない場合があり、例外がスローされることもあります。 |

このコンストラクタの使用方法については、次のコード例を参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream の概要を参照してください。
' Open or create a writable file. Dim target As New IsolatedStorageFileStream("Archive\ " & Me.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);
// 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 );


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, FileShare, IsolatedStorageFile)
アセンブリ: mscorlib (mscorlib.dll 内)

Public Sub New ( _ path As String, _ mode As FileMode, _ access As FileAccess, _ share As FileShare, _ isf As IsolatedStorageFile _ )
Dim path As String Dim mode As FileMode Dim access As FileAccess Dim share As FileShare Dim isf As IsolatedStorageFile Dim instance As New IsolatedStorageFileStream(path, mode, access, share, isf)
public IsolatedStorageFileStream ( string path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf )
public: IsolatedStorageFileStream ( String^ path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile^ isf )
public IsolatedStorageFileStream ( String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf )
public function IsolatedStorageFileStream ( path : String, mode : FileMode, access : FileAccess, share : FileShare, isf : IsolatedStorageFile )
- access
FileAccess 値のビットごとの組み合わせ。


mode パラメータは、新しいファイルを作成するか、既存のファイルを使用するかを示します。access パラメータには、読み取り専用、読み取り/書き込み可能、および書き込み専用を組み合わせて指定します。
![]() |
---|
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が正しく解釈されない場合があり、例外がスローされることもあります。 |

このコンストラクタの使用方法については、次のコード例を参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream の概要を参照してください。
' Open or create a writable file. Dim target As New IsolatedStorageFileStream("Archive\ " & Me.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);
// 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 );


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, FileShare)
アセンブリ: mscorlib (mscorlib.dll 内)

Public Sub New ( _ path As String, _ mode As FileMode, _ access As FileAccess, _ share As FileShare _ )
Dim path As String Dim mode As FileMode Dim access As FileAccess Dim share As FileShare Dim instance As New IsolatedStorageFileStream(path, mode, access, share)
public: IsolatedStorageFileStream ( String^ path, FileMode mode, FileAccess access, FileShare share )
public function IsolatedStorageFileStream ( path : String, mode : FileMode, access : FileAccess, share : FileShare )
- access
FileAccess 値のビットごとの組み合わせ。


使用する分離ストアのスコープは、現在実行されているアセンブリの ID と、このアセンブリを実行しているアプリケーション ドメインの ID によって指定されます。このストアは、IsolatedStorageFileStream オブジェクトの有効期間の間だけ開かれたままになります。別の分離ストレージ スコープを指定するか、ストアを開いたままにすることで、複数の IsolatedStorageFileStream オブジェクトを開くことができるようにする場合は、IsolatedStorageFile オブジェクトを扱える形式のコンストラクタを使用します。
![]() |
---|
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が解釈されないことがあります。さらに、例外がスローされることもあります。 |

このコンストラクタの使用方法については、次のコード例を参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream の概要を参照してください。
' 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(Me.userName, FileMode.Open, _ FileAccess.Read, FileShare.Read)
// 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(this.userName , FileMode.Open, FileAccess.Read, FileShare.Read);
// 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 );


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, FileShare, Int32, IsolatedStorageFile)
アセンブリ: mscorlib (mscorlib.dll 内)

Public Sub New ( _ path As String, _ mode As FileMode, _ access As FileAccess, _ share As FileShare, _ bufferSize As Integer, _ isf As IsolatedStorageFile _ )
Dim path As String Dim mode As FileMode Dim access As FileAccess Dim share As FileShare Dim bufferSize As Integer Dim isf As IsolatedStorageFile Dim instance As New IsolatedStorageFileStream(path, mode, access, share, bufferSize, isf)
public IsolatedStorageFileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize, IsolatedStorageFile isf )
public: IsolatedStorageFileStream ( String^ path, FileMode mode, FileAccess access, FileShare share, int bufferSize, IsolatedStorageFile^ isf )
public IsolatedStorageFileStream ( String path, FileMode mode, FileAccess access, FileShare share, int bufferSize, IsolatedStorageFile isf )
public function IsolatedStorageFileStream ( path : String, mode : FileMode, access : FileAccess, share : FileShare, bufferSize : int, isf : IsolatedStorageFile )
- access
FileAccess 値のビットごとの組み合わせ。


mode パラメータは、新しいファイルを作成するか、既存のファイルを使用するかを示します。access パラメータには、読み取り専用、読み取り/書き込み可能、および書き込み専用を組み合わせて指定します。
![]() |
---|
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が正しく解釈されない場合があり、例外がスローされることもあります。 |

このコンストラクタの使用方法については、次のコード例を参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream の概要を参照してください。
' 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)


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, FileShare, Int32)
アセンブリ: mscorlib (mscorlib.dll 内)

Public Sub New ( _ path As String, _ mode As FileMode, _ access As FileAccess, _ share As FileShare, _ bufferSize As Integer _ )
Dim path As String Dim mode As FileMode Dim access As FileAccess Dim share As FileShare Dim bufferSize As Integer Dim instance As New IsolatedStorageFileStream(path, mode, access, share, bufferSize)
public IsolatedStorageFileStream ( string path, FileMode mode, FileAccess access, FileShare share, int bufferSize )
public: IsolatedStorageFileStream ( String^ path, FileMode mode, FileAccess access, FileShare share, int bufferSize )
public IsolatedStorageFileStream ( String path, FileMode mode, FileAccess access, FileShare share, int bufferSize )
public function IsolatedStorageFileStream ( path : String, mode : FileMode, access : FileAccess, share : FileShare, bufferSize : int )
- access
FileAccess 値のビットごとの組み合わせ。


使用する分離ストアのスコープは、現在実行されているアセンブリの ID と、このアセンブリを実行しているアプリケーション ドメインの ID によって指定されます。このストアは、IsolatedStorageFileStream オブジェクトの有効期間の間だけ開かれたままになります。別の分離ストレージ スコープを指定するか、ストアを開いたままにすることで、複数の IsolatedStorageFileStream オブジェクトを開くことができるようにする場合は、IsolatedStorageFile オブジェクトを扱える形式のコンストラクタを使用します。
mode パラメータは、新しいファイルを作成するか、既存のファイルを使用するかを示します。access パラメータには、読み取り専用、読み取り/書き込み可能、および書き込み専用を組み合わせて指定します。
![]() |
---|
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が正しく解釈されない場合があり、例外がスローされることもあります。 |


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


IsolatedStorageFileStream コンストラクタ

名前 | 説明 |
---|---|
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) | mode で指定したモード、share で指定した共有モードを使用して、path で指定したファイルへの、access で指定した種類のアクセスを提供する IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。 |
IsolatedStorageFileStream (String, FileMode, FileAccess, IsolatedStorageFile) | mode で指定したモード、isf で指定した IsolatedStorageFile のコンテキストを使用して、path で指定したファイルへの、access で指定した種類のアクセスを提供する 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) | mode で指定したモード、share で指定したファイル共有モード、buffersize で指定したバッファ サイズ、isf で指定した IsolatedStorageFile のコンテキストを使用して、path で指定したファイルへの、access で指定した種類のアクセスを提供する IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。 |

IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess, IsolatedStorageFile)
アセンブリ: mscorlib (mscorlib.dll 内)

Public Sub New ( _ path As String, _ mode As FileMode, _ access As FileAccess, _ isf As IsolatedStorageFile _ )
Dim path As String Dim mode As FileMode Dim access As FileAccess Dim isf As IsolatedStorageFile Dim instance As New IsolatedStorageFileStream(path, mode, access, isf)
public IsolatedStorageFileStream ( string path, FileMode mode, FileAccess access, IsolatedStorageFile isf )
public: IsolatedStorageFileStream ( String^ path, FileMode mode, FileAccess access, IsolatedStorageFile^ isf )
public IsolatedStorageFileStream ( String path, FileMode mode, FileAccess access, IsolatedStorageFile isf )
public function IsolatedStorageFileStream ( path : String, mode : FileMode, access : FileAccess, isf : IsolatedStorageFile )
- access
FileAccess 値のビットごとの組み合わせ。


mode パラメータは、新しいファイルを作成するか、既存のファイルを使用するかを示します。access パラメータには、読み取り専用、読み取り/書き込み可能、および書き込み専用を組み合わせて指定します。
![]() |
---|
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が正しく解釈されない場合があり、例外がスローされることもあります。 |

このコンストラクタの使用方法については、次のコード例を参照してください。この例のコンテキスト全体については、IsolatedStorageFileStream の概要を参照してください。
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
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;
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;


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


IsolatedStorageFileStream コンストラクタ (String, FileMode, FileAccess)
アセンブリ: mscorlib (mscorlib.dll 内)

Dim path As String Dim mode As FileMode Dim access As FileAccess Dim instance As New IsolatedStorageFileStream(path, mode, access)
- access
FileAccess 値のビットごとの組み合わせ。


使用する分離ストアのスコープは、現在実行されているアセンブリの ID と、このアセンブリを実行しているアプリケーション ドメインの ID によって指定されます。このストアは、IsolatedStorageFileStream オブジェクトの有効期間の間だけ開かれたままになります。別の分離ストレージ スコープを指定するか、ストアを開いたままにすることで、複数の IsolatedStorageFileStream オブジェクトを開くことができるようにする場合は、IsolatedStorageFile オブジェクトを扱える形式のコンストラクタを使用します。
mode パラメータは、新しいファイルを作成するか、既存のファイルを使用するかを示します。access パラメータには、読み取り専用、読み取り/書き込み可能、および書き込み専用を組み合わせて指定します。
![]() |
---|
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が正しく解釈されない場合があり、例外がスローされることもあります。 |


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- IsolatedStorageFileStream コンストラクタのページへのリンク