base:DeleteFile()

You can post your code snippets here for others to use and learn from
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

base:DeleteFile()

Post by djrikki »

Okay I will start with this simple one first my long list of functions I use again and again:

Attempt to delete a file and return whether it succeeded or not.

Code: Select all

Global base
base = {}

Function base:DeleteFile(filename$)
    Local err
    ExitOnError(False)
    If Exists(filename$) = True
        err = False
        DeleteFile(filename$)
    Else
        err = True
    EndIf
    ExitOnError(True)
    
    Return (err)
EndFunction
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
Post Reply