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.

     'file.remove' can only remove files, but gives more detailed error
     information.

     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'.

_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'.

