IsolatedStorageFile.OpenFile Metoda
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
Otevře soubor pomocí zadaných možností sdílení a přístupu.
Přetížení
| Name | Description |
|---|---|
| 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í a zápis. |
| OpenFile(String, FileMode, FileAccess, FileShare) |
Otevře soubor v zadaném režimu se zadaným oprávněním ke čtení a zápisu a sdílení. |
OpenFile(String, FileMode)
- Zdroj:
- IsolatedStorageFile.cs
- Zdroj:
- IsolatedStorageFile.cs
- 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 otevřený v zadaném režimu s přístupem pro čtení a zápis a je nesdílený.
- Atributy
Výjimky
path je poškozený.
path je null.
Adresář v path adresáři neexistuje.
Nebyl nalezen žádný soubor a mode je nastaven na Open.
Izolované úložiště bylo uvolně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
- Zdroj:
- IsolatedStorageFile.cs
- Zdroj:
- IsolatedStorageFile.cs
Otevře soubor v zadaném režimu se zadaným přístupem pro čtení a 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
path je poškozený.
path je null.
Adresář v path adresáři neexistuje.
Nebyl nalezen žádný soubor a mode je nastaven na Open.
Izolované úložiště bylo uvolně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
- Zdroj:
- IsolatedStorageFile.cs
- Zdroj:
- IsolatedStorageFile.cs
Otevře soubor v zadaném režimu se zadaným oprávněním ke čtení a zápisu a 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 k jiným IsolatedStorageFileStream objektům, které mají tento soubor.
Návraty
Soubor otevřený v zadaném režimu a přístup a se zadanými možnostmi sdílení.
- Atributy
Výjimky
path je poškozený.
path je null.
Adresář v path adresáři neexistuje.
Nebyl nalezen žádný soubor a mode je nastaven na Open(FileMode).
Izolované úložiště bylo uvolněno.
Poznámky
Tato metoda je ekvivalentní použití konstruktoru IsolatedStorageFileStream.IsolatedStorageFileStream(String, FileMode, FileAccess, FileShare, IsolatedStorageFile) .