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.
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).
- Start Microsoft Visual Studio 2019 (VS 2017 should be OK too) and select
File > Open > Project/Solution
. - Starting in the folder where you unzipped the samples/cloned the repository, go to the subfolder for this specific sample. Double-click the Visual Studio Solution (.sln) file.
- Press
Ctrl+Shift+B
, or selectBuild > 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
.
Important: Before deploying or running the sample, please make sure your device is visible in the Device Explorer.
Tip: To display the Device Explorer, go to Visual Studio menus:
View > Other Windows > Device Explorer
.