rapidyaml 0.14.0
parse and emit YAML, and do it fast
Loading...
Searching...
No Matches
file.hpp File Reference
#include <c4/yml/error.hpp>
#include <stddef.h>
#include <stdio.h>

Go to the source code of this file.

Namespaces

namespace  c4
 (Undefined by default) Use shorter error message from checks/asserts: do not show the check condition in the error message.
namespace  c4::yml

Functions

void c4::yml::file_put_contents (void const *buf, size_t sz, const char *filename, const char *access="wb")
 save a contiguous buffer into a file
template<class ContiguousContainer>
void c4::yml::file_put_contents (ContiguousContainer const &v, const char *filename, const char *access="wb")
 save a contiguous buffer into a file
void c4::yml::file_get_contents (const char *filename, FILE *fp, size_t filesz, void *buf, size_t bufsz)
 load a file of specified size from disk into an existing contiguous buffer.
size_t c4::yml::file_get_contents (const char *filename, FILE *fp, void *buf, size_t bufsz)
 load a file from disk into an existing contiguous buffer.
size_t c4::yml::file_get_contents (const char *filename, void *buf, size_t bufsz, const char *access="rb")
 load a file from disk into an existing contiguous buffer.
template<class ContiguousContainer>
void c4::yml::file_get_contents (ContiguousContainer *v, const char *filename, const char *access="rb")
 load a file from disk into an existing ContiguousContainer, resizing it to fit the file's contents
template<class ContiguousContainer>
ContiguousContainer c4::yml::file_get_contents (const char *filename, const char *access="rb")
 load a file from disk and return a newly created ContiguousContainer with the file contents
template<class ContiguousContainer>
void c4::yml::stdin_get_contents (ContiguousContainer *cont, FILE *f=stdin)
 load a file from stdin (or similar stream-like file) and return a newly created ContiguousContainer with the file contents
template<class ContiguousContainer>
ContiguousContainer c4::yml::stdin_get_contents (FILE *f=stdin)
 load a file from stdin and return a newly created ContiguousContainer with the file contents