IsolatedStorageFile.OpenFile メソッド

定義

指定した共有オプションとアクセス オプションを使用してファイルを開きます。

オーバーロード

名前 説明
OpenFile(String, FileMode)

指定したモードでファイルを開きます。

OpenFile(String, FileMode, FileAccess)

指定した読み取り/書き込みアクセス権を持つ指定したモードでファイルを開きます。

OpenFile(String, FileMode, FileAccess, FileShare)

指定したモードで、指定した読み取り/書き込みアクセス許可と共有アクセス許可を持つファイルを開きます。

OpenFile(String, FileMode)

ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs

指定したモードでファイルを開きます。

public:
 System::IO::IsolatedStorage::IsolatedStorageFileStream ^ OpenFile(System::String ^ path, System::IO::FileMode mode);
public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode);
[System.Runtime.InteropServices.ComVisible(false)]
public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode);
member this.OpenFile : string * System.IO.FileMode -> System.IO.IsolatedStorage.IsolatedStorageFileStream
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.OpenFile : string * System.IO.FileMode -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Function OpenFile (path As String, mode As FileMode) As IsolatedStorageFileStream

パラメーター

path
String

分離ストア内のファイルの相対パス。

mode
FileMode

ファイルを開く方法を指定する列挙値の 1 つ。

返品

指定したモードで開き、読み取り/書き込みアクセス権を持ち、共有されていないファイル。

属性

例外

分離ストアが削除されました。

-又は-

分離ストレージは無効になっています。

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

pathnullです。

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

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

分離ストアが破棄されました。

注釈

このメソッドは、 IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, IsolatedStorageFile) コンストラクターの使用と同じです。

こちらもご覧ください

適用対象

OpenFile(String, FileMode, FileAccess)

ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs

指定した読み取り/書き込みアクセス権を持つ指定したモードでファイルを開きます。

public:
 System::IO::IsolatedStorage::IsolatedStorageFileStream ^ OpenFile(System::String ^ path, System::IO::FileMode mode, System::IO::FileAccess access);
public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode, System.IO.FileAccess access);
[System.Runtime.InteropServices.ComVisible(false)]
public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode, System.IO.FileAccess access);
member this.OpenFile : string * System.IO.FileMode * System.IO.FileAccess -> System.IO.IsolatedStorage.IsolatedStorageFileStream
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.OpenFile : string * System.IO.FileMode * System.IO.FileAccess -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Function OpenFile (path As String, mode As FileMode, access As FileAccess) As IsolatedStorageFileStream

パラメーター

path
String

分離ストア内のファイルの相対パス。

mode
FileMode

ファイルを開く方法を指定する列挙値の 1 つ。

access
FileAccess

ファイルを読み取り、書き込み、または読み取り/書き込みアクセスで開くかどうかを指定する列挙値の 1 つ。

返品

指定したモードとアクセスで開き、共有されていないファイル。

属性

例外

分離ストアが削除されました。

-又は-

分離ストレージは無効になっています。

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

pathnullです。

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

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

分離ストアが破棄されました。

注釈

このメソッドは、 IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, IsolatedStorageFile) コンストラクターの使用と同じです。

こちらもご覧ください

適用対象

OpenFile(String, FileMode, FileAccess, FileShare)

ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs
ソース:
IsolatedStorageFile.cs

指定したモードで、指定した読み取り/書き込みアクセス許可と共有アクセス許可を持つファイルを開きます。

public:
 System::IO::IsolatedStorage::IsolatedStorageFileStream ^ OpenFile(System::String ^ path, System::IO::FileMode mode, System::IO::FileAccess access, System::IO::FileShare share);
public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share);
[System.Runtime.InteropServices.ComVisible(false)]
public System.IO.IsolatedStorage.IsolatedStorageFileStream OpenFile(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share);
member this.OpenFile : string * System.IO.FileMode * System.IO.FileAccess * System.IO.FileShare -> System.IO.IsolatedStorage.IsolatedStorageFileStream
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.OpenFile : string * System.IO.FileMode * System.IO.FileAccess * System.IO.FileShare -> System.IO.IsolatedStorage.IsolatedStorageFileStream
Public Function OpenFile (path As String, mode As FileMode, access As FileAccess, share As FileShare) As IsolatedStorageFileStream

パラメーター

path
String

分離ストア内のファイルの相対パス。

mode
FileMode

ファイルを開くか作成する方法を指定する列挙値の 1 つ。

access
FileAccess

ファイルを読み取り、書き込み、または読み取り/書き込みアクセスで開くかどうかを指定する列挙値の 1 つ。

share
FileShare

他の IsolatedStorageFileStream オブジェクトがこのファイルに対して持つアクセスの種類を指定する列挙値のビットごとの組み合わせ。

返品

指定したモードとアクセスで開き、指定した共有オプションを持つファイル。

属性

例外

分離ストアが削除されました。

-又は-

分離ストレージは無効になっています。

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

pathnullです。

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

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

分離ストアが破棄されました。

注釈

このメソッドは、 IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile) コンストラクターの使用と同じです。

こちらもご覧ください

適用対象