write_file
Description:
[ Version ( deprecated = true , since = "0.8" ) ]
public bool write_file (string path, string content, int32 size) throws Error
public bool write_file (string path, string content, int32 size) throws Error
Warning: write_file is deprecated.
create a file
Note:
In new code, use write instead
This call creates a file called path
. The contents of the file is the string content
(which can contain any 8 bit
data), with length size
.
As a special case, if size
is @0 then the length is calculated using strlen
(so in this case the content cannot
contain embedded ASCII NULs).
*NB.* Owing to a bug, writing content containing ASCII NUL characters does *not* work, even if the length is specified.
Parameters:
this |
A GuestfsSession object |
Returns:
true on success, false on error |