cat


Description:

[ Version ( since = "0.4" ) ]
public string cat (string path) throws Error

list the contents of a file

Return the contents of the file named path.

Because, in C, this function returns a "char *", there is no way to differentiate between a "\0" character in a file and end of string. To handle binary files, use the read_file or download functions.

Parameters:

this

A GuestfsSession object

Returns:

the returned string, or NULL on error