Sortix cisortix manual
This manual documents Sortix cisortix. You can instead view this document in the latest official manual.
NAME
BIO_s_file, BIO_new_file, BIO_new_fp, BIO_set_fp, BIO_get_fp, BIO_read_filename, BIO_write_filename, BIO_append_filename, BIO_rw_filename — FILE BIOSYNOPSIS
#include <openssl/bio.h>BIO_s_file(void);
BIO_new_file(const char *filename, const char *mode);
BIO_new_fp(FILE *stream, int flags);
BIO_set_fp(BIO *b, FILE *fp, int flags);
BIO_get_fp(BIO *b, FILE **fpp);
BIO_read_filename(BIO *b, char *name);
BIO_write_filename(BIO *b, char *name);
BIO_append_filename(BIO *b, char *name);
BIO_rw_filename(BIO *b, char *name);
DESCRIPTION
BIO_s_file() returns the BIO file method. As its name implies, it is a wrapper around the stdio FILE structure and it is a source/sink BIO.RETURN VALUES
BIO_s_file() returns the file BIO method.EXAMPLES
File BIO "hello world":BIO *bio_out; bio_out = BIO_new_fp(stdout, BIO_NOCLOSE); BIO_printf(bio_out, "Hello World\n");
BIO *bio_out; bio_out = BIO_new(BIO_s_file()); if(bio_out == NULL) /* Error ... */ if(!BIO_set_fp(bio_out, stdout, BIO_NOCLOSE)) /* Error ... */ BIO_printf(bio_out, "Hello World\n");
BIO *out; out = BIO_new_file("filename.txt", "w"); if(!out) /* Error occurred */ BIO_printf(out, "Hello World\n"); BIO_free(out);
BIO *out; out = BIO_new(BIO_s_file()); if(out == NULL) /* Error ... */ if(!BIO_write_filename(out, "filename.txt")) /* Error ... */ BIO_printf(out, "Hello World\n"); BIO_free(out);