Shows how to use the Windows.Storage API to access storage, create and list folders and files, read and write from/to files using text or binary data.
Note: This sample is part of a large collection of nanoFramework feature samples. If you are unfamiliar with Git and GitHub, you can download the entire collection as a ZIP file, but be sure to unzip everything to access any shared dependencies.
This sample shows how a user can create a folder and files in removable storage and files in internal flash storage. Internal flash storage doesn't support folders.
Lists the removable storage devices present in the target and runs the following folder and file base scenarios on the 1st drive.
Lists the internal storage devices present in the target and runs the following file base scenarios on the 1st drive.
Shows how to mount a SDCard device and list the folders and files.
This scenario demonstrates how to create a folder in a storage device, not replacing it if it already exists.
This scenario demonstrates how to create a file in a folder inside a storage device.
This scenario demonstrates how to write a string to a text file and then read it back.
This scenario demonstrates how to write a string converted to binary formate to a binary file and then read it back.
Shows how to create folders in multi levels.
This scenario goes further than the Create a file scenario to create multiple files in a low level folder.
This scenario demonstrates how to rename a folder.
This scenario demonstrates how delete files and folder with a recursive method to delete a whole folder tree.
This scenario demonstrates how to rename a file.
This scenario demonstrates how to un-mount a mounted drive (ESP32)
This scenario demonstrates how to subscribe event handlers for Removable Devices events to be notified when a storage device is inserted and removed.
Any hardware device running a nanoFramework image built with support for Windows.Storage device (SD card or USB mass storage device).
- If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
- Start Microsoft Visual Studio 2017 and select File > Open > Project/Solution.
- Starting in the folder where you unzipped the samples, go to the subfolder for this specific sample. Double-click the Visual Studio Solution (.sln) file.
- Press Ctrl+Shift+B, or select Build > Build Solution.
The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.
- Select Build > Deploy Solution.
- To debug the sample and then run it, press F5 or select Debug > Start Debugging.