B4J Code Snippet SafeKill

Hi all.

I have been using this little routine in one language or another for many many years.
It allows you to not have to check if the files exists first before deleting it.

Happy coding!


B4X:
Public Sub SafeKill(pFolder As String, pName As String)
    Try 
        File.Delete(pFolder,pName)
    Catch
    End Try'ignore
End Sub
 
Top