C# 클래스 Cimbalino.Phone.Toolkit.Services.AsyncStorageService

Represents an implementation of the IAsyncStorageService.
상속: IAsyncStorageService
파일 보기 프로젝트 열기: Cimbalino/Cimbalino-Phone-Toolkit

공개 메소드들

메소드 설명
AppendAllLines ( string path, IEnumerable contents ) : System.Threading.Tasks.Task

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

AppendAllLines ( 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 ( 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.

AppendAllText ( 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.

CopyFileAsync ( string sourceFileName, string destinationFileName ) : System.Threading.Tasks.Task

Copies an existing file to a new file.

CopyFileAsync ( string sourceFileName, string destinationFileName, bool overwrite ) : System.Threading.Tasks.Task

Copies an existing file to a new file, and optionally overwrites an existing file.

CreateDirectoryAsync ( string dir ) : System.Threading.Tasks.Task

Creates a directory in the storage scope.

CreateFileAsync ( string path ) : Task

Creates a file in the store.

DeleteDirectoryAsync ( string dir ) : System.Threading.Tasks.Task

Deletes a directory in the storage scope.

DeleteFileAsync ( string path ) : System.Threading.Tasks.Task

Deletes the specified file.

DirectoryExistsAsync ( string dir ) : Task

Determines whether the specified path refers to an existing directory in the store.

FileExistsAsync ( string path ) : Task

Determines whether the specified path refers to an existing file in the store.

GetDirectoryNamesAsync ( ) : Task

Enumerates the directories in the root of a store.

GetDirectoryNamesAsync ( string searchPattern ) : Task

Enumerates directories in a storage scope that match a given pattern.

GetFileNamesAsync ( ) : Task

Obtains the names of files in the root of a store.

GetFileNamesAsync ( string searchPattern ) : Task

Enumerates files in storage scope that match a given pattern.

OpenFileForReadAsync ( string path ) : Task

Opens a file in the specified mode.

ReadAllBytesAsync ( string path ) : Task

Opens a binary file, reads the contents of the file into a byte array, and then closes the file. Returns null, if an exception is raised.

ReadAllLinesAsync ( string path ) : Task

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

ReadAllLinesAsync ( string path, Encoding encoding ) : Task

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

ReadAllTextAsync ( string path ) : Task

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

ReadAllTextAsync ( string path, Encoding encoding ) : Task

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

WriteAllBytesAsync ( 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.

WriteAllLinesAsync ( 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 ( 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.

WriteAllTextAsync ( 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 ( 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.

비공개 메소드들

메소드 설명
FilePatternToRegex ( string pattern ) : Regex

메소드 상세

AppendAllLines() 공개 메소드

Appends lines to a file, and then closes the file.
public AppendAllLines ( string path, IEnumerable contents ) : System.Threading.Tasks.Task
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

AppendAllLines() 공개 메소드

Appends lines to a file by using a specified encoding, and then closes the file.
public AppendAllLines ( string path, IEnumerable contents, Encoding encoding ) : System.Threading.Tasks.Task
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 AppendAllText ( string path, string contents ) : System.Threading.Tasks.Task
path string The file to append the specified string to.
contents string The string to append to the file.
리턴 System.Threading.Tasks.Task

AppendAllText() 공개 메소드

Appends the specified string to the file, creating the file if it does not already exist.
public AppendAllText ( string path, string contents, Encoding encoding ) : System.Threading.Tasks.Task
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

CopyFileAsync() 공개 메소드

Copies an existing file to a new file.
public CopyFileAsync ( string sourceFileName, string destinationFileName ) : System.Threading.Tasks.Task
sourceFileName string The name of the file to copy.
destinationFileName string The name of the destination file. This cannot be a directory or an existing file.
리턴 System.Threading.Tasks.Task

CopyFileAsync() 공개 메소드

Copies an existing file to a new file, and optionally overwrites an existing file.
public CopyFileAsync ( string sourceFileName, string destinationFileName, bool overwrite ) : System.Threading.Tasks.Task
sourceFileName string The name of the file to copy.
destinationFileName string The name of the destination file. This cannot be a directory.
overwrite bool true if the destination file can be overwritten; otherwise, false.
리턴 System.Threading.Tasks.Task

CreateDirectoryAsync() 공개 메소드

Creates a directory in the storage scope.
public CreateDirectoryAsync ( string dir ) : System.Threading.Tasks.Task
dir string The relative path of the directory to create within the storage.
리턴 System.Threading.Tasks.Task

CreateFileAsync() 공개 메소드

Creates a file in the store.
public CreateFileAsync ( string path ) : Task
path string The relative path of the file to be created in the store.
리턴 Task

DeleteDirectoryAsync() 공개 메소드

Deletes a directory in the storage scope.
public DeleteDirectoryAsync ( string dir ) : System.Threading.Tasks.Task
dir string The relative path of the directory to delete within the storage scope.
리턴 System.Threading.Tasks.Task

DeleteFileAsync() 공개 메소드

Deletes the specified file.
public DeleteFileAsync ( string path ) : System.Threading.Tasks.Task
path string The name of the file to be deleted. Wildcard characters are not supported.
리턴 System.Threading.Tasks.Task

DirectoryExistsAsync() 공개 메소드

Determines whether the specified path refers to an existing directory in the store.
public DirectoryExistsAsync ( string dir ) : Task
dir string The path to test.
리턴 Task

FileExistsAsync() 공개 메소드

Determines whether the specified path refers to an existing file in the store.
public FileExistsAsync ( string path ) : Task
path string The path and file name to test.
리턴 Task

GetDirectoryNamesAsync() 공개 메소드

Enumerates the directories in the root of a store.
public GetDirectoryNamesAsync ( ) : Task
리턴 Task

GetDirectoryNamesAsync() 공개 메소드

Enumerates directories in a storage scope that match a given pattern.
public GetDirectoryNamesAsync ( string searchPattern ) : Task
searchPattern string A search pattern. Both single-character ("?") and multi-character ("*") wildcards are supported.
리턴 Task

GetFileNamesAsync() 공개 메소드

Obtains the names of files in the root of a store.
public GetFileNamesAsync ( ) : Task
리턴 Task

GetFileNamesAsync() 공개 메소드

Enumerates files in storage scope that match a given pattern.
public GetFileNamesAsync ( string searchPattern ) : Task
searchPattern string A search pattern. Both single-character ("?") and multi-character ("*") wildcards are supported.
리턴 Task

OpenFileForReadAsync() 공개 메소드

Opens a file in the specified mode.
public OpenFileForReadAsync ( string path ) : Task
path string The relative path of the file within the store.
리턴 Task

ReadAllBytesAsync() 공개 메소드

Opens a binary file, reads the contents of the file into a byte array, and then closes the file. Returns null, if an exception is raised.
public ReadAllBytesAsync ( string path ) : Task
path string The file to open for reading.
리턴 Task

ReadAllLinesAsync() 공개 메소드

Opens a text file, reads all lines of the file, and then closes the file.
public ReadAllLinesAsync ( string path ) : Task
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 ReadAllLinesAsync ( string path, Encoding encoding ) : Task
path string The file to open for reading.
encoding System.Text.Encoding The encoding applied to the contents of the file.
리턴 Task

ReadAllTextAsync() 공개 메소드

Opens a text file, reads all lines of the file, and then closes the file.
public ReadAllTextAsync ( string path ) : Task
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 ReadAllTextAsync ( string path, Encoding encoding ) : Task
path string The file to open for reading.
encoding System.Text.Encoding The encoding applied to the contents of the file.
리턴 Task

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 WriteAllBytesAsync ( string path, byte bytes ) : System.Threading.Tasks.Task
path string The file to write to.
bytes byte The bytes to write to the file.
리턴 System.Threading.Tasks.Task

WriteAllLinesAsync() 공개 메소드

Creates a new file, writes a collection of strings to the file, and then closes the file.
public WriteAllLinesAsync ( string path, IEnumerable contents ) : System.Threading.Tasks.Task
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 WriteAllLinesAsync ( string path, IEnumerable contents, Encoding encoding ) : System.Threading.Tasks.Task
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

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 WriteAllTextAsync ( string path, string contents ) : System.Threading.Tasks.Task
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 WriteAllTextAsync ( string path, string contents, Encoding encoding ) : System.Threading.Tasks.Task
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