mode に指定したモードで、path で指定したファイルへの、access に指定した種類のアクセスを提供する、IsolatedStorageFileStream クラスの新しいインスタンスを初期化します。
名前空間: System.IO.IsolatedStorage
アセンブリ: mscorlib (mscorlib.dll 内)
構文
'宣言
Public Sub New ( _
path As String, _
mode As FileMode, _
access As FileAccess _
)
'使用
Dim path As String
Dim mode As FileMode
Dim access As FileAccess
Dim instance As New IsolatedStorageFileStream(path, mode, access)
public IsolatedStorageFileStream (
string path,
FileMode mode,
FileAccess access
)
public:
IsolatedStorageFileStream (
String^ path,
FileMode mode,
FileAccess access
)
public IsolatedStorageFileStream (
String path,
FileMode mode,
FileAccess access
)
public function IsolatedStorageFileStream (
path : String,
mode : FileMode,
access : FileAccess
)
パラメータ
- path
分離ストレージ内でのファイルの相対パス。
- mode
FileMode 値の 1 つ。
- access
FileAccess 値のビットごとの組み合わせ。
例外
例外の種類 | 条件 |
---|---|
path の形式が正しくありません。 |
|
path が null 参照 (Visual Basic では Nothing) です。 |
|
mode に Open が設定されていますが、ファイルが見つかりません。 |
解説
使用する分離ストアのスコープは、現在実行されているアセンブリの ID と、このアセンブリを実行しているアプリケーション ドメインの ID によって指定されます。このストアは、IsolatedStorageFileStream オブジェクトの有効期間の間だけ開かれたままになります。別の分離ストレージ スコープを指定するか、ストアを開いたままにすることで、複数の IsolatedStorageFileStream オブジェクトを開くことができるようにする場合は、IsolatedStorageFile オブジェクトを扱える形式のコンストラクタを使用します。
mode パラメータは、新しいファイルを作成するか、既存のファイルを使用するかを示します。access パラメータには、読み取り専用、読み取り/書き込み可能、および書き込み専用を組み合わせて指定します。
ヒント
特定のカルチャ設定で文字セットをコンパイルし、同じ文字を異なるカルチャ設定で取得すると、文字が正しく解釈されない場合があり、例外がスローされることもあります。
.NET Framework のセキュリティ
- IsolatedStorageFilePermission (分離ストレージへのアクセス用)
プラットフォーム
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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
.NET Framework
サポート対象 : 2.0、1.1、1.0
参照
関連項目
IsolatedStorageFileStream クラス
IsolatedStorageFileStream メンバ
System.IO.IsolatedStorage 名前空間