core: stream: Add stream file operations
Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
@@ -19,4 +19,19 @@ struct data_stream {
|
||||
size_t length;
|
||||
};
|
||||
|
||||
/*
|
||||
* Obtain a stream from a file
|
||||
*
|
||||
* @stmp: Stream pointer result
|
||||
* @path: Path of file to obtain stream from
|
||||
*
|
||||
* Returns zero on success
|
||||
*/
|
||||
int stream_from_file(struct data_stream *stmp, const char *path);
|
||||
|
||||
/*
|
||||
* Destroy a data stream
|
||||
*/
|
||||
void stream_destroy(struct data_stream *stmp);
|
||||
|
||||
#endif /* !BLOBCHAIN_STREAM_H */
|
||||
|
||||
Reference in New Issue
Block a user