Here is a class for SD file operations written in VB. It is not production quality code by any means and there may be bugs (probably) and needs more error checking, but it should get you started. The last time I used this code was over two years ago. It was a first cut and needs more work. It runs on a Netduino Plus or Plus 2 running firmware 4.2.1
https://www.dropbox....eOperations.zip
The code maintains a list of folders/files on the SD card with provision to create and delete folders and read/write/delete files.
Usage:
Using SD As SDcard = New SDcard()
Debug.Print(SD.volumeInfo)
Debug.Print(SD.files)
Dim flag as Boolean = SD.createDir("\SD\ABC")
If(flag) Then
Debug.Print( "Directory created successfully")
Else
Debug.Print( "That directory already exists")
End If
'
'Etc
'
End Using 'SD card
Always use the full path as a string like this for addressing a file or folder,
"\SD\ABC" --> access or create folder ABC under the root, \SD\
and,
"\SD\ABC\x" --> access or create a sub-folder x under ABC
To save text to a text file named, "My_textfile" in folder, x with content, "some content", using the saveTextFile method,
call: saveTextFile("some content","\SD\ABC\x\My_textfile").
There is an optional argument to saveTextFile, true or false. The default is false which overwrites an existing file. True appends to an existing file. Most of the file operations with the SD card are pretty much like regular Vb.NET.