Skip to content
  • Thomas Haller's avatar
    core: add nm_utils_file_get_contents() and nm_utils_fd_get_contents() · 1d9bdad1
    Thomas Haller authored
    A reimplementation of g_file_get_contents() to overcome two limitations:
    
     - nm_utils_file_get_contents() accepts a @dirfd argument to open the
       file relative using openat().
     - nm_utils_fd_get_contents() allows to read the content from a file
       filedescriptor.
     - both support a max_length argument, to fail gracefully if we
       get tricked into loading a huge file.
    1d9bdad1