About
An output stream is used to write data to a resource defined with a maxon::Url. maxon::OutputStreamInterface is based on maxon::BaseStreamInterface.
Usage
maxon::BaseStreamInterface provides these simple functions:
- Note
- To append to the end of a file use the flags maxon::OPENSTREAMFLAGS::WRITE_DONT_TRUNCATE and maxon::OPENSTREAMFLAGS::SEEK_TO_END.
{
const maxon::OutputStreamRef stream = url.OpenOutputStream()
iferr_return;
}
Definition: basearray.h:413
Definition: string.h:1226
@ NONEXISTENT
Url doesn't exist.
#define iferr_return
Definition: resultbase.h:1465
if (isHTTP || isHTTPS)
{
const maxon::InputStreamRef inputStream = webFile.OpenInputStream()
iferr_return;
const maxon::OutputStreamRef outputStream = localFile.OpenOutputStream()
iferr_return;
}
ResultMem Resize(Int newCnt, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::DEFAULT)
Definition: basearray.h:1124
Definition: apibaseid.h:251
bool Bool
boolean type, possible values are only false/true, 8 bit
Definition: apibase.h:183
int64_t Int64
64 bit signed integer datatype.
Definition: apibase.h:180
static const Id URLSCHEME_HTTPS
Definition: url.h:719
static const Id URLSCHEME_HTTP
Definition: url.h:714
Further Reading