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


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

   SYNOPSIS
        result = DeleteDiskObject(name)
          D0                      A0

        bool deletediskobject(strptr);

   FUNCTION
        This routine will try to delete a Workbench disk object from disk.
        The name parameter will have ".info" postpended to it, and the
        icon file of that name will be deleted.  If the call fails,
        it will return FALSE. The reason for the failure may be obtained
        via dos.library/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 = 0;

        /* Check if you have the right library version */
        if(IconBase->lib_Version > 36)
        {
            if (!DeleteDiskObject(name))
                error = IoErr();
        }
        else
        {
            /* Delete name plus ".info" */
        }

        if (error != 0)
        {
            /* Do error routine...*/
        }

   SEE ALSO
        dos.library/ioerr
        icon.library/putdiskobject
        icon.library/getdiskobject
        icon.library/freediskobject
        icon.library/geticontaglist
        icon.library/puticontaglist