files2                 package:base                 R Documentation

_M_a_n_i_p_u_l_a_t_o_n _o_f _D_i_r_e_c_t_o_r_i_e_s _a_n_d _f_i_l_e _P_e_r_m_i_s_s_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     These functions provide a low-level interface to the computer's
     file system.

_U_s_a_g_e:

     dir.create(path, showWarnings = TRUE, recursive = FALSE, mode = "0777")
     Sys.chmod(paths, mode = "0777")
     Sys.umask(mode = "0000")

_A_r_g_u_m_e_n_t_s:

    path: a character vector containing a single path name.

   paths: character vectors containing file or directory paths.

showWarnings: logical; should the warnings on failure be shown?

recursive: logical. Should elements of the path other than the last be
          created?  If true, like Unix's 'mkdir -p'.

    mode: the file mode to be used on Unix-alikes: it will be coerced
          by 'as.octmode'.

_D_e_t_a_i_l_s:

     'dir.create' creates the last element of the path, unless
     'recursive = TRUE'.  Trailing path separators are removed. The
     mode will be modified by the 'umask' setting in the same way as
     for the system function 'mkdir'.  What modes can be set is
     OS-dependent, and it is unsafe to assume that more than three
     octal digits will be used.  For more details see your OS's
     documentation on the system call 'mkdir' (and not that on the
     command-line utility of that name). 

     'Sys.chmod' sets the file permissions of one or more files. It may
     not be supported (when a warning is issued). See the comments for
     'dir.create' for how modes are interpreted. Changing mode on a
     symbolic link is unlikely to work (nor be necessary).  For more
     details see your OS's documentation on the system call 'chmod'
     (and not that on the command-line utility of that name). 

     'Sys.umask' sets the 'umask'. It may not be supported (when a
     warning is issued and '"0000"' returned).  For more details see
     your OS's documentation on the system call 'umask'.

_V_a_l_u_e:

     'dir.create' and 'Sys.chmod' return invisibly a logical vector
     indicating if the operation succeeded for each of the files
     attempted. Using a missing value for a path name will always be
     regarded as a failure.  'dir.create' indicates failure if the
     directory already exists.  If 'showWarnings = TRUE', 'dir.create'
     will give a warning for an unexpected failure (e.g. not for a
     missing value nor for an already existing component for 'recursive
     = TRUE').

     'Sys.umask' returns the previous value of the 'umask', invisibly,
     as a length-one object of class '"octmode"'.

_A_u_t_h_o_r(_s):

     Ross Ihaka, Brian Ripley

_S_e_e _A_l_s_o:

     'file.info', 'file.exists', 'file.path', 'list.files', 'unlink',
     'basename', 'path.expand'.

