[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


NAME
    DeleteDiskObject - Delete a Workbench disk object from disk.     (V37)

SYNOPSIS
    result = DeleteDiskObject(name)
      D0                      A0

    BOOL DeleteDiskObject(char *);

FUNCTION
    This routine will try to delete a Workbench disk object from disk.
    The name parameter will have a ".info" postpended to it, and the
    info file of that name will be deleted.  If the call fails,
    it will return zero.  The reason for the failure may be obtained
    via IoErr().

    This call also updates the Workbench screen if needed.

    Using this routine protects you from any future changes to
    the way icons are stored within the system.

INPUTS
    name -- name of the object (char *)

RESULTS
    result -- TRUE if it worked, false if not.

EXAMPLE
    error=NULL;

    *Check if you have the right library version*

    if (((struct Library *)IconBase)->lib_Version > 36)
    {
            if (!DeleteDiskObject(name)) error=IoErr();
    }
    else
    {
            * Delete name plus ".info" *
    }

    if (error)
    {
            * Do error routine...*
    }

SEE ALSO
    PutDiskObject(), GetDiskObject(), FreeDiskObject()

BUGS
    None