Manual:DIL Manual/delstr()

From DikuMUD Wiki
Jump to navigation Jump to search


Function:  integer delstr( filename : string ) ;
  filename
         The name of the String file to be deleted
  Return
         Returns an integer TRUE if deleted FALSE if not
The delstr is used to delete files that are used with the 'loadstr' and
'savestr'       functions.  The delstr function will only delete files that
each individual Zone has access to which is set up in the Zonelist file in the
VME etc directory.
Example:

---~---~---~---~---~---~---~---~---
dilbegin news|del ("arg : string /*filename to be deleted);
var
        ret:integer;/*to hold the return value if deleted or not*/
code
{
ret:= delstr("news.txt");
if (!ret)
        {
        log ("File not deleted.");
        quit;
        }
sendtext ("News file deleted[&]n",self);
quit;/*dil delete routine done
}
dilend


---~---~---~---~---~---~---~---~---

See Also 
Load String file and
Save String file