C# Класс Cimbalino.Phone.Toolkit.Extensions.IsolatedStorageFileExtensions

Provides a set of static (Shared in Visual Basic) methods for IsolatedStorageFile instances.
Показать файл Открыть проект

Открытые методы

Метод Описание
AppendAllLines ( this store, string path, IEnumerable contents ) : void

Appends lines to a file, and then closes the file.

AppendAllLines ( this store, string path, IEnumerable contents, Encoding encoding ) : void

Appends lines to a file by using a specified encoding, and then closes the file.

AppendAllLinesAsync ( this store, string path, IEnumerable contents ) : System.Threading.Tasks.Task

Appends lines to a file, and then closes the file.

AppendAllLinesAsync ( this store, string path, IEnumerable contents, Encoding encoding ) : System.Threading.Tasks.Task

Appends lines to a file by using a specified encoding, and then closes the file.

AppendAllText ( this store, string path, string contents ) : void

Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.

AppendAllText ( this store, string path, string contents, Encoding encoding ) : void

Appends the specified string to the file, creating the file if it does not already exist.

AppendAllTextAsync ( this store, string path, string contents ) : System.Threading.Tasks.Task

Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.

AppendAllTextAsync ( this store, string path, string contents, Encoding encoding ) : System.Threading.Tasks.Task

Appends the specified string to the file, creating the file if it does not already exist.

DeleteDirectory ( this store, string path, bool recursive ) : void

Deletes the specified directory and, if indicated, any subdirectories and files in the directory.

ReadAllBytes ( this store, string path ) : byte[]

Opens a binary file, reads the contents of the file into a byte array, and then closes the file.

ReadAllBytesAsync ( this store, string path ) : Task

Opens a binary file, reads the contents of the file into a byte array, and then closes the file.

ReadAllLines ( this store, string path ) : string[]

Opens a text file, reads all lines of the file, and then closes the file.

ReadAllLines ( this store, string path, Encoding encoding ) : string[]

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

ReadAllLinesAsync ( this store, string path ) : Task

Opens a text file, reads all lines of the file, and then closes the file.

ReadAllLinesAsync ( this store, string path, Encoding encoding ) : Task

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

ReadAllText ( this store, string path ) : string

Opens a text file, reads all lines of the file, and then closes the file.

ReadAllText ( this store, string path, Encoding encoding ) : string

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

ReadAllTextAsync ( this store, string path ) : Task

Opens a text file, reads all lines of the file, and then closes the file.

ReadAllTextAsync ( this store, string path, Encoding encoding ) : Task

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

ReadLines ( this store, string path ) : IEnumerable

Reads the lines of a file.

ReadLines ( this store, string path, Encoding encoding ) : IEnumerable

Reads the lines of a file that has a specified encoding.

WriteAllBytes ( this store, string path, byte bytes ) : void

Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten..

WriteAllBytesAsync ( this store, string path, byte bytes ) : System.Threading.Tasks.Task

Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten..

WriteAllLines ( this store, string path, IEnumerable contents ) : void

Creates a new file, writes a collection of strings to the file, and then closes the file.

WriteAllLines ( this store, string path, IEnumerable contents, Encoding encoding ) : void

Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.

WriteAllLinesAsync ( this store, string path, IEnumerable contents ) : System.Threading.Tasks.Task

Creates a new file, writes a collection of strings to the file, and then closes the file.

WriteAllLinesAsync ( this store, string path, IEnumerable contents, Encoding encoding ) : System.Threading.Tasks.Task

Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.

WriteAllText ( this store, string path, string contents ) : void

Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.

WriteAllText ( this store, string path, string contents, Encoding encoding ) : void

Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.

WriteAllTextAsync ( this store, string path, string contents ) : System.Threading.Tasks.Task

Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.

WriteAllTextAsync ( this store, string path, string contents, Encoding encoding ) : System.Threading.Tasks.Task

Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.

Приватные методы

Метод Описание
InternalWriteAllLines ( IsolatedStorageFileStream fileStream, IEnumerable contents, Encoding encoding ) : void
InternalWriteAllLinesAsync ( IsolatedStorageFileStream fileStream, IEnumerable contents, Encoding encoding ) : System.Threading.Tasks.Task
InternalWriteAllText ( IsolatedStorageFileStream fileStream, string contents, Encoding encoding ) : void
InternalWriteAllTextAsync ( IsolatedStorageFileStream fileStream, string contents, Encoding encoding ) : System.Threading.Tasks.Task

Описание методов

AppendAllLines() публичный статический Метод

Appends lines to a file, and then closes the file.
public static AppendAllLines ( this store, string path, IEnumerable contents ) : void
store this The object.
path string The file to append the lines to. The file is created if it does not already exist.
contents IEnumerable The lines to append to the file.
Результат void

AppendAllLines() публичный статический Метод

Appends lines to a file by using a specified encoding, and then closes the file.
public static AppendAllLines ( this store, string path, IEnumerable contents, Encoding encoding ) : void
store this The object.
path string The file to append the lines to. The file is created if it does not already exist.
contents IEnumerable The lines to append to the file.
encoding System.Text.Encoding The character encoding to use.
Результат void

AppendAllLinesAsync() публичный статический Метод

Appends lines to a file, and then closes the file.
public static AppendAllLinesAsync ( this store, string path, IEnumerable contents ) : System.Threading.Tasks.Task
store this The object.
path string The file to append the lines to. The file is created if it does not already exist.
contents IEnumerable The lines to append to the file.
Результат System.Threading.Tasks.Task

AppendAllLinesAsync() публичный статический Метод

Appends lines to a file by using a specified encoding, and then closes the file.
public static AppendAllLinesAsync ( this store, string path, IEnumerable contents, Encoding encoding ) : System.Threading.Tasks.Task
store this The object.
path string The file to append the lines to. The file is created if it does not already exist.
contents IEnumerable The lines to append to the file.
encoding System.Text.Encoding The character encoding to use.
Результат System.Threading.Tasks.Task

AppendAllText() публичный статический Метод

Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.
public static AppendAllText ( this store, string path, string contents ) : void
store this The object.
path string The file to append the specified string to.
contents string The string to append to the file.
Результат void

AppendAllText() публичный статический Метод

Appends the specified string to the file, creating the file if it does not already exist.
public static AppendAllText ( this store, string path, string contents, Encoding encoding ) : void
store this The object.
path string The file to append the specified string to.
contents string The string to append to the file.
encoding System.Text.Encoding The character encoding to use.
Результат void

AppendAllTextAsync() публичный статический Метод

Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.
public static AppendAllTextAsync ( this store, string path, string contents ) : System.Threading.Tasks.Task
store this The object.
path string The file to append the specified string to.
contents string The string to append to the file.
Результат System.Threading.Tasks.Task

AppendAllTextAsync() публичный статический Метод

Appends the specified string to the file, creating the file if it does not already exist.
public static AppendAllTextAsync ( this store, string path, string contents, Encoding encoding ) : System.Threading.Tasks.Task
store this The object.
path string The file to append the specified string to.
contents string The string to append to the file.
encoding System.Text.Encoding The character encoding to use.
Результат System.Threading.Tasks.Task

DeleteDirectory() публичный статический Метод

Deletes the specified directory and, if indicated, any subdirectories and files in the directory.
public static DeleteDirectory ( this store, string path, bool recursive ) : void
store this The object.
path string The relative path of the directory to delete within the isolated storage scope.
recursive bool true to remove directories, subdirectories, and files in path; otherwise, false.
Результат void

ReadAllBytes() публичный статический Метод

Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
public static ReadAllBytes ( this store, string path ) : byte[]
store this The object.
path string The file to open for reading.
Результат byte[]

ReadAllBytesAsync() публичный статический Метод

Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
public static ReadAllBytesAsync ( this store, string path ) : Task
store this The object.
path string The file to open for reading.
Результат Task

ReadAllLines() публичный статический Метод

Opens a text file, reads all lines of the file, and then closes the file.
public static ReadAllLines ( this store, string path ) : string[]
store this The object.
path string The file to open for reading.
Результат string[]

ReadAllLines() публичный статический Метод

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
public static ReadAllLines ( this store, string path, Encoding encoding ) : string[]
store this The object.
path string The file to open for reading.
encoding System.Text.Encoding The encoding applied to the contents of the file.
Результат string[]

ReadAllLinesAsync() публичный статический Метод

Opens a text file, reads all lines of the file, and then closes the file.
public static ReadAllLinesAsync ( this store, string path ) : Task
store this The object.
path string The file to open for reading.
Результат Task

ReadAllLinesAsync() публичный статический Метод

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
public static ReadAllLinesAsync ( this store, string path, Encoding encoding ) : Task
store this The object.
path string The file to open for reading.
encoding System.Text.Encoding The encoding applied to the contents of the file.
Результат Task

ReadAllText() публичный статический Метод

Opens a text file, reads all lines of the file, and then closes the file.
public static ReadAllText ( this store, string path ) : string
store this The object.
path string The file to open for reading.
Результат string

ReadAllText() публичный статический Метод

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
public static ReadAllText ( this store, string path, Encoding encoding ) : string
store this The object.
path string The file to open for reading.
encoding System.Text.Encoding The encoding applied to the contents of the file.
Результат string

ReadAllTextAsync() публичный статический Метод

Opens a text file, reads all lines of the file, and then closes the file.
public static ReadAllTextAsync ( this store, string path ) : Task
store this The object.
path string The file to open for reading.
Результат Task

ReadAllTextAsync() публичный статический Метод

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
public static ReadAllTextAsync ( this store, string path, Encoding encoding ) : Task
store this The object.
path string The file to open for reading.
encoding System.Text.Encoding The encoding applied to the contents of the file.
Результат Task

ReadLines() публичный статический Метод

Reads the lines of a file.
public static ReadLines ( this store, string path ) : IEnumerable
store this The object.
path string The file to read.
Результат IEnumerable

ReadLines() публичный статический Метод

Reads the lines of a file that has a specified encoding.
public static ReadLines ( this store, string path, Encoding encoding ) : IEnumerable
store this The object.
path string The file to read.
encoding System.Text.Encoding The encoding that is applied to the contents of the file.
Результат IEnumerable

WriteAllBytes() публичный статический Метод

Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten..
public static WriteAllBytes ( this store, string path, byte bytes ) : void
store this The object.
path string The file to write to.
bytes byte The bytes to write to the file.
Результат void

WriteAllBytesAsync() публичный статический Метод

Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten..
public static WriteAllBytesAsync ( this store, string path, byte bytes ) : System.Threading.Tasks.Task
store this The object.
path string The file to write to.
bytes byte The bytes to write to the file.
Результат System.Threading.Tasks.Task

WriteAllLines() публичный статический Метод

Creates a new file, writes a collection of strings to the file, and then closes the file.
public static WriteAllLines ( this store, string path, IEnumerable contents ) : void
store this The object.
path string The file to write to.
contents IEnumerable The lines to write to the file.
Результат void

WriteAllLines() публичный статический Метод

Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.
public static WriteAllLines ( this store, string path, IEnumerable contents, Encoding encoding ) : void
store this The object.
path string The file to write to.
contents IEnumerable The lines to write to the file.
encoding System.Text.Encoding The character encoding to use.
Результат void

WriteAllLinesAsync() публичный статический Метод

Creates a new file, writes a collection of strings to the file, and then closes the file.
public static WriteAllLinesAsync ( this store, string path, IEnumerable contents ) : System.Threading.Tasks.Task
store this The object.
path string The file to write to.
contents IEnumerable The lines to write to the file.
Результат System.Threading.Tasks.Task

WriteAllLinesAsync() публичный статический Метод

Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.
public static WriteAllLinesAsync ( this store, string path, IEnumerable contents, Encoding encoding ) : System.Threading.Tasks.Task
store this The object.
path string The file to write to.
contents IEnumerable The lines to write to the file.
encoding System.Text.Encoding The character encoding to use.
Результат System.Threading.Tasks.Task

WriteAllText() публичный статический Метод

Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.
public static WriteAllText ( this store, string path, string contents ) : void
store this The object.
path string The file to write to.
contents string The string to write to the file.
Результат void

WriteAllText() публичный статический Метод

Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.
public static WriteAllText ( this store, string path, string contents, Encoding encoding ) : void
store this The object.
path string The file to write to.
contents string The string to write to the file.
encoding System.Text.Encoding The encoding to apply to the string.
Результат void

WriteAllTextAsync() публичный статический Метод

Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.
public static WriteAllTextAsync ( this store, string path, string contents ) : System.Threading.Tasks.Task
store this The object.
path string The file to write to.
contents string The string to write to the file.
Результат System.Threading.Tasks.Task

WriteAllTextAsync() публичный статический Метод

Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.
public static WriteAllTextAsync ( this store, string path, string contents, Encoding encoding ) : System.Threading.Tasks.Task
store this The object.
path string The file to write to.
contents string The string to write to the file.
encoding System.Text.Encoding The encoding to apply to the string.
Результат System.Threading.Tasks.Task