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 recusively?

_D_e_t_a_i_l_s:

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

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

_V_a_l_u_e:

     The return value of the corresponding system command, `rm -f',
     normally `0' for success, `1' for failure. Not deleting a
     non-existent file is not a failure.

_N_o_t_e:

     Prior to R version 1.2.0 the default on Unix was `recursive =
     TRUE', and on Windows empty directories could be deleted.

_S_e_e _A_l_s_o:

     `file.remove'.

