file.info                package:base                R Documentation

_E_x_t_r_a_c_t _F_i_l_e _I_n_f_o_r_m_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Utility function to extract information about files on the user's
     file systems.

_U_s_a_g_e:

     file.info(...)

_A_r_g_u_m_e_n_t_s:

     ...: character vectors containing file names.

_D_e_t_a_i_l_s:

     What is meant by ``file access'' and hence the last access time is
     system-dependent.

     On most systems symbolic links are followed, so information is
     given about the file to which the link points rather than about
     the link.

_V_a_l_u_e:

     A data frame with row names the file names and columns 

    size: integer: File size in bytes.

   isdir: logical: Is the file a directory?

    mode: integer of class `"octmode"'.  The file permissions, printed
          in octal, for example `644'.

mtime, ctime, atime: integer of class `"POSIXct"': file modification,
          creation and last access times.

     uid: integer: the user ID of the file's owner.

     gid: integer: the group ID of the file's group.

   uname: character: `uid' interpreted as a user name.

  grname: character: `gid' interpreted as a group name.

     Unknown user and group names will be `NA'.

     Entries for non-existent or non-readable files will be `NA'. The
     `uid'

_N_o_t_e:

     This function will only be operational on systems with the `stat'
     system call, but that seems very widely available.

_A_u_t_h_o_r(_s):

     B. D. Ripley

_S_e_e _A_l_s_o:

     `files', `file.access', `list.files', and `DateTimeClasses' for
     the date formats.

_E_x_a_m_p_l_e_s:

     ncol(finf <- file.info(dir()))# at least six
     finf # the whole list
     ## Those that are more than 100 days old :
     finf[difftime(Sys.time(), finf[,"mtime"], units="days") > 100 , 1:4]

     file.info("no-such-file-exists")

