locked
How to view files stored in LocalStorage ? C# .Net - Metro RRS feed

  • Question

  • Hi, is there a way to view all my stored files in LocalStorage folder ? 

    I know I can use the path C:\Users\Username\AppData\Local\Packages\SomeNumber\LocalState

    but I want to do it programmatically, so I can add evry title of the file to a List. 

    Friday, October 4, 2013 9:36 AM

Answers

  • Hello ImNew54, 

    Try this:

    IReadOnlyList<StorageFile> filelist = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFilesAsync();

    • Marked as answer by ImNew54 Friday, October 4, 2013 12:52 PM
    Friday, October 4, 2013 11:05 AM

All replies

  • I hope you understand LocalStorage is isolated from rest of the world i.e. it is just by the same App you can read it and not from any other App.

    To see how to read write files in LocalStorage you can refer

    You would also like to refer ApplicationData class


    -- Vishal Kaushik --

    Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you. Happy Coding!!!

    Friday, October 4, 2013 10:48 AM
  • Hello ImNew54, 

    Try this:

    IReadOnlyList<StorageFile> filelist = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFilesAsync();

    • Marked as answer by ImNew54 Friday, October 4, 2013 12:52 PM
    Friday, October 4, 2013 11:05 AM