head_n
Description:
[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "1.0.54" ) ]
public string[] head_n (int32 nrlines, string path) throws Error
[ Version ( since = "1.0.54" ) ]
public string[] head_n (int32 nrlines, string path) throws Error
return first N lines of a file
If the parameter nrlines
is a positive number, this returns the first nrlines
lines of the file path
.
If the parameter nrlines
is a negative number, this returns lines from the file path
, excluding the last
nrlines
lines.
If the parameter nrlines
is zero, this returns an empty list.
Parameters:
this |
A GuestfsSession object |
Returns:
an array of returned strings, or NULL on error |