After many hours of programming saved based on downloading free source code from SourceForge and GitHub, we (DreamTimeStudioZ) have finally released our first open-source library: IORecipes for Windows 8 and Windows Phone 8.

Doing I/O using the Windows.Storage APIs on Windows 8 and Windows Phone 8 is relatively straightforward yet doing simple things like creating a file involves handling exceptions and potentially multiple API calls so we built a library that makes simple things simple.

Some of the APIs are listed below.

For full documentation and to download IORecipes go to: https://github.com/DreamTimerZ/IORecipes

Enjoy!

 

Create a file in the specified folder

    public static async Task<StorageFile> CreateFileInFolder(StorageFolder storageFolder, string fileName)

Create the specified subfolder in the app's root storage folder

    public static async Task<StorageFolder> CreateOrGetFolder(string folderName)

Delete the specified file from the specified folder

    public static async Task<bool> DeleteFileInFolder(StorageFolder storageFolder, string fileName)

Get the root folder for storing files created by your user

    public static StorageFolder GetAppStorageFolder()

Get the installation folder for the current app. This is used to retrieve data files you've bundled with your app as opposed to data files created by your user.

    public static StorageFolder GetAppInstallationFolder()

Get the names of all the files in the default folder for this app

    public static async Task<List<string>> GetDocumentFiles()

Get a list of names of files whose filename ends with the specified extension

     public static async Task<List<string>> GetDocumentFilesOfTypeFromFolder(StorageFolder storageFolder, string extension)