home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat3 / remove.3 < prev    next >
Encoding:
Text File  |  1993-03-03  |  1.6 KB  |  67 lines

  1.  
  2.  
  3.  
  4. UNLINK(3)           MINTLIB LIBRARY FUNCTIONS           UNLINK(3)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        unlink - remove directory entry
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        #include <unistd.h>
  12.  
  13.        int unlink(char *path);
  14.  
  15.        #include <stdio.h>
  16.  
  17.        int remove(const char *path);
  18.  
  19. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  20.        unlink  removes  the directory entry named by the pathname
  21.        pointed to by path.   On  file  systems  that  allow  hard
  22.        links,  the  link  count  of  the file referred to by that
  23.        entry is decremented by one. If this entry  was  the  last
  24.        link to the file, the file is removed.
  25.  
  26.        If any process has the file open, and the file system sup-
  27.        ports removal of open files, the actual resource  reclama-
  28.        tion  is delayed until the file is closed, even though the
  29.        directory entry has disappeared.
  30.  
  31. R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
  32.        unlink returns:
  33.  
  34.         0 on success.  -1 on failure and sets errno  to  indicate
  35.        the error.
  36.  
  37. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  38.        c✓cl✓lo✓os✓se✓e(✓(3✓3)✓),✓, l✓li✓in✓nk✓k(✓(3✓3)✓),✓, r✓rm✓md✓di✓ir✓r(✓(3✓3)✓)
  39.  
  40. N✓NO✓OT✓TE✓ES✓S
  41.        Applications should use rmdir to remove directories.
  42.  
  43.        MS-DOS (TOS) filesystems do not support hardlinks.
  44.  
  45.        MS-DOS  (TOS)  filesystems  only allow the removal of open
  46.        files, to be deleted on closing, since MiNT 0.98. The file
  47.        will still have a directory entry, though.
  48.  
  49.        The  identical  function remove is available for backwards
  50.        compatibility. Its use is discouraged.
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. MiNT docs 0.1              3 March 1993                         1
  65.  
  66.  
  67.