unlink                 package:base                 R Documentation

_D_e_l_e_t_e _F_i_l_e_s _a_n_d _D_i_r_e_c_t_o_r_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     'unlink' deletes the file(s) or directories specified by 'x'.

_U_s_a_g_e:

     unlink(x, recursive = FALSE)

_A_r_g_u_m_e_n_t_s:

       x: a character vector with the names of the file(s) or
          directories to be deleted. Wildcards (normally '*' and '?')
          are allowed.

recursive: logical. Should directories be deleted recursively?

_D_e_t_a_i_l_s:

     If 'recursive = FALSE' directories are not deleted, not even empty
     ones.

     On most platforms 'file' includes symbolic links, fifos and
     sockets.

     Wildcard expansion is done by the internal code of 'Sys.glob'.
     Wildcards will only be expanded if the system supports it.

     'recursive = TRUE' is not supported on all platforms, and may be
     ignored, with a warning.

_V_a_l_u_e:

     '0' for success, '1' for failure. Not deleting a non-existent file
     is not a failure, nor is being unable to delete a directory if
     'recursive = FALSE'.  However, missing values in 'x' result are
     regarded as failures.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     'file.remove'.

