C# Class ModernApp4Me.WP8.Cache.M4MFilePersistence

Enables to store some contents into the IsolatedStorageFile. The classe implements the singleton pattern and is thread safe !
Afficher le fichier Open project: smartnsoft/ModernApp4Me

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
M4MFilePersistence ( ) : System

Method Details

CleanupIsolatedStorage() public méthode

Cleans-up the Isolated Storage
public CleanupIsolatedStorage ( ) : bool
Résultat bool

CreateDirectory() public méthode

Creates a directory into the Isolated Storage.
public CreateDirectory ( string directoryName ) : bool
directoryName string the name of the directory
Résultat bool

CreateDirectoryFromFilePath() public méthode

Creates a directory from a complete path into the Isolated Storage
public CreateDirectoryFromFilePath ( string filePath ) : bool
filePath string the complete path
Résultat bool

DeleteFile() public méthode

Deletes a file from the Isolated Storage.
public DeleteFile ( string fileName ) : bool
fileName string the name of the file to delete.
Résultat bool

IsFileExists() public méthode

Checks if a file exists into the Isolated Storage
public IsFileExists ( string fileName ) : bool
fileName string the name of the file
Résultat bool

ReadBinary() public méthode

Reads a binary contents from a file into the Isolated Storage
public ReadBinary ( string fileName ) : MemoryStream
fileName string the file to read
Résultat System.IO.MemoryStream

ReadFile() public méthode

Reads a file from the Isolated StorageFile.
public ReadFile ( string fileName ) : string
fileName string the name of the file to read
Résultat string

WriteFile() public méthode

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
Résultat bool