Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <libc/stubs.h>
  3. #include <io.h>
  4. #include <stdio.h>
  5. #include <errno.h>
  6. #include <libc/dosio.h>
  7. #include <menuet/os.h>
  8.  
  9. int remove(const char *fn)
  10. {
  11.         struct systree_info2 inf;
  12.         int res;
  13.         _fixpath(fn,inf.name);
  14.         inf.command = 8;
  15.         inf.file_offset_low = inf.file_offset_high = 0;
  16.         inf.size = inf.data_pointer = 0;
  17.         res = __kolibri__system_tree_access2(&inf);
  18.         if (res == 0) return 0;
  19.         if (res == 5) errno = ENOENT;
  20.         else errno = EACCES;
  21.         return -1;
  22. }
  23.