How do i delete a directory?
The directory is created when doing this:
I have tried this (with and without the test for file.exists). Both didn't delete the directory. And yes - the directory is empty, because i delete the .txt file first. This works. It is located in C:\Users\[user name]\AppData\Roaming\[AppName], where [AppName] is "Save Test".
The directory is created when doing this:
B4X:
map.Put(TextField1.Text, TextField2.Text)
File.WriteMap(File.DirData("Save Test"), "savetest.txt", map)
I have tried this (with and without the test for file.exists). Both didn't delete the directory. And yes - the directory is empty, because i delete the .txt file first. This works. It is located in C:\Users\[user name]\AppData\Roaming\[AppName], where [AppName] is "Save Test".
B4X:
If File.Exists(File.DirData("Save Test"), File.DirData("Save Test")) = True Then
File.Delete(File.DirData("Save Test"), File.DirData("Save Test"))
End If