Thanks Erel for your help!
With your code it is working now.
It is indeed very confusing. If i use your code and after that if i use
IfFile.Exists(File.DirData("Save Test") it will return false for not being existant. However it will be immediately recreated because the use of DirData in the If....
I'm not sure why you want to delete it
This has no explicit use. I'm just playing around with B4J trying and learning some things. I thought when my programm creates a file or a folder, it should also delete this file or folder. I know this is not directly related, but i hate it when i uninstall software and there are files and folders left over...
BTW: The documentation doesn't mention this delete & recreate behaviour at all.
Additional i asked the question in the beginning, cause the documentation missleaded me. It says:
Delete (Dir As String, FileName As String) As Boolean
Deletes the specified file. If the file name is a directory then it must be empty in order to be deleted.
Returns true if the file was successfully deleted.
Files in the assets folder cannot be deleted.
https://b4x.com/b4j/help/files.html#file
The bold part made me think that i have to use the directory as filename, like i did in the very first post.
Maybe it was just me, maybe this is missleading and could be improoved