> home > Custom Layer Boundary API

buffer_save

January 19th 2020
Save the contents of a buffer to a file

Signature

C++
b32
buffer_save(Application_Links* app,
            Buffer_ID buffer_id,
            String_Const_u8 file_name,
            Buffer_Save_Flag flags);

Parameters

app

the standard custom layer context pointer

buffer_id

the id of the buffer who's contents to write to disk

file_name

the name of the file to be written, if empty and the buffer has an attached file, that is used instead, using this does not alter the attachment of the buffer either way

flags

flags controlling the behavior of the save

Return

non-zero when the buffer exists and the file was successfully written, zero otherwise

Related

Buffer_Save_Flag