Handling files and directories is a very elementary part of B4A. If a Bug had existed it would have been found years ago.
You did not describe your problem in #1. If you want to delete a file always use:
If File.Exists(NameDir, FileName) then File.Delete(NameDir, FileName)
Are you using your code within a Sub? "Return True" won't work outside of a sub. Please show your full code.