|
Gemmi C++ API
|
File-related utilities. More...
#include <cassert>#include <cstdio>#include <cstdint>#include <cstdlib>#include <cstring>#include <initializer_list>#include <memory>#include "fail.hpp"Go to the source code of this file.
Classes | |
| struct | gemmi::needs_fclose |
| deleter for fileptr_t More... | |
| class | gemmi::CharArray |
Namespaces | |
| namespace | gemmi |
Typedefs | |
| typedef std::unique_ptr< std::FILE, needs_fclose > | gemmi::fileptr_t |
Functions | |
| std::string | gemmi::path_basename (const std::string &path, std::initializer_list< const char * > exts) |
| fileptr_t | gemmi::file_open (const char *path, const char *mode) |
| fileptr_t | gemmi::file_open_or (const char *path, const char *mode, std::FILE *dash_stream) |
| std::size_t | gemmi::file_size (std::FILE *f, const std::string &path) |
| bool | gemmi::is_little_endian () |
| void | gemmi::swap_two_bytes (void *start) |
| void | gemmi::swap_four_bytes (void *start) |
| void | gemmi::swap_eight_bytes (void *start) |
| CharArray | gemmi::read_file_into_buffer (const std::string &path) |
| reading file into a memory buffer (optimized: uses fseek to determine file size) | |
| CharArray | gemmi::read_stdin_into_buffer () |
| template<typename T > | |
| CharArray | gemmi::read_into_buffer (T &&input) |
File-related utilities.
Definition in file fileutil.hpp.