read_file


Description:

[ CCode ( array_length_pos = 1.1 , array_length_type = "gsize" ) ]
[ Version ( since = "1.0.63" ) ]
public uint8[] read_file (string path) throws Error

read a file

This calls returns the contents of the file path as a buffer.

Unlike cat, this function can correctly handle files that contain embedded ASCII NUL characters.

Parameters:

this

A GuestfsSession object

size_r

The size of the returned buffer, in bytes

Returns:

an array of binary data, or NULL on error