Blender V4.3
BLI_fileops.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10#pragma once
11
12#ifndef __cplusplus
13# error This is a C++ header
14#endif
15
16#include "BLI_fileops.h"
17#include "BLI_string_ref.hh"
18
19#include <fstream>
20#include <string>
21
22namespace blender {
23
29class fstream : public std::fstream {
30 public:
31 fstream() = default;
32 explicit fstream(const char *filepath,
33 std::ios_base::openmode mode = ios_base::in | ios_base::out);
34 explicit fstream(const std::string &filepath,
35 std::ios_base::openmode mode = ios_base::in | ios_base::out);
36
37 void open(StringRefNull filepath, ios_base::openmode mode = ios_base::in | ios_base::out);
38};
39
40} // namespace blender
File and directory operations.
void open(StringRefNull filepath, ios_base::openmode mode=ios_base::in|ios_base::out)
Definition fileops.cc:26
fstream()=default