CONTENTS | INDEX | PREV | NEXT

 unlink

 NAME
  unlink - delete a file

 SYNOPSIS
  int r = unlink(filename);
  char *filename;

  UNIX compatibility call, use remove() for ANSI compatibility.

 FUNCTION
  delete a file, equivalent to remove(filename).  This call deletes
  a file from the filesystem.

 EXAMPLE
  main()
  {
      int r;
      r = unlink("T:xx");
      if (r == 0)
      puts("deleted T:xx");
      else
      puts("unable to delete t:xx or it does not exist");
  }

 INPUTS
  char *filename;     name of file to delete

 RESULTS
  int r;          0 if successful, non-zero if error