C# Класс ModernApp4Me.WP8.Cache.M4MFilePersistence

Enables to store some contents into the IsolatedStorageFile. The classe implements the singleton pattern and is thread safe !
Показать файл Открыть проект

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

Метод Описание
CleanupIsolatedStorage ( ) : bool

Cleans-up the Isolated Storage

CreateDirectory ( string directoryName ) : bool

Creates a directory into the Isolated Storage.

CreateDirectoryFromFilePath ( string filePath ) : bool

Creates a directory from a complete path into the Isolated Storage

DeleteFile ( string fileName ) : bool

Deletes a file from the Isolated Storage.

IsFileExists ( string fileName ) : bool

Checks if a file exists into the Isolated Storage

ReadBinary ( string fileName ) : MemoryStream

Reads a binary contents from a file into the Isolated Storage

ReadFile ( string fileName ) : string

Reads a file from the Isolated StorageFile.

WriteFile ( string fileName, string fileContent, FileMode fileMode ) : bool

Writes a string into a file located into the Isolated Storage.

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

Метод Описание
M4MFilePersistence ( ) : System

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

CleanupIsolatedStorage() публичный Метод

Cleans-up the Isolated Storage
public CleanupIsolatedStorage ( ) : bool
Результат bool

CreateDirectory() публичный Метод

Creates a directory into the Isolated Storage.
public CreateDirectory ( string directoryName ) : bool
directoryName string the name of the directory
Результат bool

CreateDirectoryFromFilePath() публичный Метод

Creates a directory from a complete path into the Isolated Storage
public CreateDirectoryFromFilePath ( string filePath ) : bool
filePath string the complete path
Результат bool

DeleteFile() публичный Метод

Deletes a file from the Isolated Storage.
public DeleteFile ( string fileName ) : bool
fileName string the name of the file to delete.
Результат bool

IsFileExists() публичный Метод

Checks if a file exists into the Isolated Storage
public IsFileExists ( string fileName ) : bool
fileName string the name of the file
Результат bool

ReadBinary() публичный Метод

Reads a binary contents from a file into the Isolated Storage
public ReadBinary ( string fileName ) : MemoryStream
fileName string the file to read
Результат System.IO.MemoryStream

ReadFile() публичный Метод

Reads a file from the Isolated StorageFile.
public ReadFile ( string fileName ) : string
fileName string the name of the file to read
Результат string

WriteFile() публичный Метод

Writes a string into a file located into the Isolated Storage.
public WriteFile ( string fileName, string fileContent, FileMode fileMode ) : bool
fileName string the file name
fileContent string the file content
fileMode FileMode the
Результат bool