
  -spec read_file_info(File) -> {ok, FileInfo} | {error, Reason}
                          when
                              File :: name_all() | io_device(),
                              FileInfo :: file_info(),
                              Reason :: posix() | badarg.

Since:
  OTP R15B

  Retrieves information about a file. Returns {ok, FileInfo} if
  successful, otherwise {error, Reason}. FileInfo is a record 
  file_info, defined in the Kernel include file file.hrl. Include
  the following directive in the module from which the function is
  called:

     -include_lib("kernel/include/file.hrl").

  The time type returned in atime, mtime, and ctime is
  dependent on the time type set in Opts :: {time, Type} as
  follows:

  local:
    Returns local time.

  universal:
    Returns universal time.

  posix:
    Returns seconds since or before Unix time epoch, which is
    1970-01-01 00:00 UTC.

  Default is {time, local}.

  If the option raw is set, the file server is not called and only
  information about local files is returned. Note that this will
  break this module's atomicity guarantees as it can race with a
  concurrent call to write_file_info/1,2 .

  This option has no effect when the function is given an I/O device
  instead of a file name. Use open/2 with the raw mode to obtain
  a file descriptor first.

  Note:
    As file times are stored in POSIX time on most OS, it is
    faster to query file information with option posix.

  The record file_info contains the following fields:

  size = integer() >= 0:
    Size of file in bytes.

  type = device | directory | other | regular:
    The type of the file. Can also contain symlink when returned
    from read_link_info/1,2.

  access = read | write | read_write | none:
    The current system access to the file.

  atime = date_time() | integer() >= 0:
    The last time the file was read.

  mtime = date_time() | integer() >= 0:
    The last time the file was written.

  ctime = date_time() | integer() >=0:
    The interpretation of this time field depends on the operating
    system. On Unix, it is the last time the file or the inode
    was changed. In Windows, it is the create time.

  mode = integer() >= 0:
    The file permissions as the sum of the following bit values:

    8#00400:
      read permission: owner

    8#00200:
      write permission: owner

    8#00100:
      execute permission: owner

    8#00040:
      read permission: group

    8#00020:
      write permission: group

    8#00010:
      execute permission: group

    8#00004:
      read permission: other

    8#00002:
      write permission: other

    8#00001:
      execute permission: other

    16#800:
      set user id on execution

    16#400:
      set group id on execution

    On Unix platforms, other bits than those listed above may be
    set.

  links = integer() >= 0:
    Number of links to the file (this is always 1 for file systems
    that have no concept of links).

  major_device = integer() >= 0:
    Identifies the file system where the file is located. In
    Windows, the number indicates a drive as follows: 0 means A:,
    1 means B:, and so on.

  minor_device = integer() >= 0:
    Only valid for character devices on Unix. In all other cases,
    this field is zero.

  inode = integer() >= 0:
    Gives the inode number. On non-Unix file systems, this field
    is zero.

  uid = integer() >= 0:
    Indicates the owner of the file. On non-Unix file systems,
    this field is zero.

  gid = integer() >= 0:
    Gives the group that the owner of the file belongs to. On
    non-Unix file systems, this field is zero.

  Typical error reasons:

  eacces:
    Missing search permission for one of the parent directories of
    the file.

  enoent:
    The file does not exist.

  enotdir:
    A component of the filename is not a directory. On some
    platforms, enoent is returned instead.
