13 Feb
2017
13 Feb
'17
8:58 a.m.
Hi, On Monday, 13 February 2017 12:33:11 CET MUHAMMAD MOHSIN wrote:
Now I am trying to modify source code of guestfs_download () to extract file in memory.
There is no need to do that, since there is already an API for this: guestfs_read_file. For example, you can do: size_t file_size = 0; char *content = guestfs_read_file (g, "/path/in/the/guest", &file_size); 'content' will hold all the content of the file, and 'file_size' how many bytes are in the 'content' buffer). -- Pino Toscano