Create a new data buffer, returns Error Status Code.
publicstaticErrorcreate_from_file (outData d, string filename, int copy = 1)
Create a new data buffer filled with the content of the file. COPY
must be non-zero. For delayed read, please use create_from_fd or create_from stream instead.
Create a new data buffer filled with SIZE bytes starting from BUFFER.
If COPY is false, COPYING is delayed until necessary and the data is taken from the original location when needed. Returns Error
Status Code.
Read up to SIZE bytes into buffer BUFFER from the data object. Return
the number of characters read, 0 on EOF and -1 on error. If an error occurs, errno is set.
Write up to SIZE bytes from buffer BUFFER to the data object. Return
the number of characters written, or -1 on error. If an error occurs, errno is set.