IsolatedStorageFile.OpenFile Metoda

Definicja

Otwiera plik przy użyciu określonych opcji udostępniania i dostępu.

Przeciążenia

OpenFile(String, FileMode)

Otwiera plik w określonym trybie.

OpenFile(String, FileMode, FileAccess)

Otwiera plik w określonym trybie z określonym dostępem do odczytu/zapisu.

OpenFile(String, FileMode, FileAccess, FileShare)

Otwiera plik w określonym trybie z określonym dostępem do odczytu/zapisu i udostępnianiem.

OpenFile(String, FileMode)

Źródło:
IsolatedStorageFile.cs
Źródło:
IsolatedStorageFile.cs
Źródło:
IsolatedStorageFile.cs

Otwiera plik w określonym trybie.

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

Parametry

path
String

Ścieżka względna pliku w izolowanym magazynie.

mode
FileMode

Jedna z wartości wyliczenia określająca sposób otwierania pliku.

Zwraca

Plik otwarty w określonym trybie z dostępem do odczytu/zapisu i jest nieudostępniany.

Atrybuty

Wyjątki

Wydzielony magazyn został usunięty.

-lub-

Wydzielona pamięć masowa jest wyłączona.

path jest źle sformułowany.

path to null.

Katalog w programie path nie istnieje.

Nie znaleziono pliku i mode parametr jest ustawiony na Openwartość .

Wydzielony magazyn został usunięty.

Uwagi

Ta metoda jest równoważna użyciu konstruktora IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, IsolatedStorageFile) .

Zobacz też

Dotyczy

OpenFile(String, FileMode, FileAccess)

Źródło:
IsolatedStorageFile.cs
Źródło:
IsolatedStorageFile.cs
Źródło:
IsolatedStorageFile.cs

Otwiera plik w określonym trybie z określonym dostępem do odczytu/zapisu.

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

Parametry

path
String

Ścieżka względna pliku w izolowanym magazynie.

mode
FileMode

Jedna z wartości wyliczenia określająca sposób otwierania pliku.

access
FileAccess

Jedna z wartości wyliczenia określająca, czy plik zostanie otwarty z dostępem do odczytu, zapisu lub odczytu/zapisu.

Zwraca

Plik otwarty w określonym trybie i dostępie i jest nieudostępniany.

Atrybuty

Wyjątki

Wydzielony magazyn został usunięty.

-lub-

Wydzielona pamięć masowa jest wyłączona.

path jest źle sformułowany.

path to null.

Katalog w programie path nie istnieje.

Nie znaleziono pliku i mode parametr jest ustawiony na Openwartość .

Wydzielony magazyn został usunięty.

Uwagi

Ta metoda jest równoważna użyciu konstruktora IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, IsolatedStorageFile) .

Zobacz też

Dotyczy

OpenFile(String, FileMode, FileAccess, FileShare)

Źródło:
IsolatedStorageFile.cs
Źródło:
IsolatedStorageFile.cs
Źródło:
IsolatedStorageFile.cs

Otwiera plik w określonym trybie z określonym dostępem do odczytu/zapisu i udostępnianiem.

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

Parametry

path
String

Ścieżka względna pliku w izolowanym magazynie.

mode
FileMode

Jedna z wartości wyliczenia określająca sposób otwierania lub tworzenia pliku.

access
FileAccess

Jedna z wartości wyliczenia określająca, czy plik zostanie otwarty z dostępem do odczytu, zapisu lub odczytu/zapisu.

share
FileShare

Bitowa kombinacja wartości wyliczenia określających typ dostępu do innych IsolatedStorageFileStream obiektów musi być tym plikiem.

Zwraca

Plik otwarty w określonym trybie i dostępie oraz z określonymi opcjami udostępniania.

Atrybuty

Wyjątki

Wydzielony magazyn został usunięty.

-lub-

Wydzielona pamięć masowa jest wyłączona.

path jest źle sformułowany.

path to null.

Katalog w programie path nie istnieje.

Nie znaleziono pliku i mode parametr jest ustawiony na Open(FileMode)wartość .

Wydzielony magazyn został usunięty.

Uwagi

Ta metoda jest równoważna użyciu konstruktora IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile) .

Zobacz też

Dotyczy