Share via


IsolatedStorageFile.OpenFile Metoda

Definice

Otevře soubor pomocí zadaných možností sdílení a přístupu.

Přetížení

OpenFile(String, FileMode)

Otevře soubor v zadaném režimu.

OpenFile(String, FileMode, FileAccess)

Otevře soubor v zadaném režimu se zadaným přístupem pro čtení i zápis.

OpenFile(String, FileMode, FileAccess, FileShare)

Otevře soubor v zadaném režimu se zadaným přístupem ke čtení a zápisu a oprávněním ke sdílení.

OpenFile(String, FileMode)

Zdroj:
IsolatedStorageFile.cs
Zdroj:
IsolatedStorageFile.cs
Zdroj:
IsolatedStorageFile.cs

Otevře soubor v zadaném režimu.

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

Relativní cesta k souboru v izolovaném úložišti.

mode
FileMode

Jedna z hodnot výčtu, která určuje, jak otevřít soubor.

Návraty

Soubor, který je otevřen v zadaném režimu s přístupem pro čtení a zápis a je nesdílený.

Atributy

Výjimky

Izolované úložiště bylo odebráno.

-nebo-

Izolované úložiště je zakázané.

path je poškozený.

path je null.

Adresář v path souboru neexistuje.

Nebyl nalezen žádný soubor a mode vlastnost je nastavená na Openhodnotu .

Izolované úložiště bylo odstraněno.

Poznámky

Tato metoda je ekvivalentní použití konstruktoru IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, IsolatedStorageFile) .

Viz také

Platí pro

OpenFile(String, FileMode, FileAccess)

Zdroj:
IsolatedStorageFile.cs
Zdroj:
IsolatedStorageFile.cs
Zdroj:
IsolatedStorageFile.cs

Otevře soubor v zadaném režimu se zadaným přístupem pro čtení i zápis.

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

Relativní cesta k souboru v izolovaném úložišti.

mode
FileMode

Jedna z hodnot výčtu, která určuje, jak otevřít soubor.

access
FileAccess

Jedna z hodnot výčtu, která určuje, jestli se soubor otevře s přístupem pro čtení, zápis nebo čtení/zápis.

Návraty

Soubor, který je otevřen v zadaném režimu a přístupu a je nesdílený.

Atributy

Výjimky

Izolované úložiště bylo odebráno.

-nebo-

Izolované úložiště je zakázané.

path je poškozený.

path je null.

Adresář v path souboru neexistuje.

Nebyl nalezen žádný soubor a mode vlastnost je nastavená na Openhodnotu .

Izolované úložiště bylo odstraněno.

Poznámky

Tato metoda je ekvivalentní použití konstruktoru IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, IsolatedStorageFile) .

Viz také

Platí pro

OpenFile(String, FileMode, FileAccess, FileShare)

Zdroj:
IsolatedStorageFile.cs
Zdroj:
IsolatedStorageFile.cs
Zdroj:
IsolatedStorageFile.cs

Otevře soubor v zadaném režimu se zadaným přístupem ke čtení a zápisu a oprávněním ke sdílení.

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

Relativní cesta k souboru v izolovaném úložišti.

mode
FileMode

Jedna z hodnot výčtu, která určuje, jak otevřít nebo vytvořit soubor.

access
FileAccess

Jedna z hodnot výčtu, která určuje, jestli se soubor otevře s přístupem pro čtení, zápis nebo čtení/zápis.

share
FileShare

Bitové kombinace hodnot výčtu, které určují typ přístupu jiné IsolatedStorageFileStream objekty k tomuto souboru.

Návraty

Soubor, který je otevřen v zadaném režimu a přístup a se zadanými možnostmi sdílení.

Atributy

Výjimky

Izolované úložiště bylo odebráno.

-nebo-

Izolované úložiště je zakázané.

path je poškozený.

path je null.

Adresář v path souboru neexistuje.

Nebyl nalezen žádný soubor a mode vlastnost je nastavená na Open(FileMode)hodnotu .

Izolované úložiště bylo odstraněno.

Poznámky

Tato metoda je ekvivalentní použití konstruktoru IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile) .

Viz také

Platí pro