Blender V5.0
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
9
10#pragma once
11
12#include "BLI_fileops.h" // IWYU pragma: export
13#include "BLI_string_ref.hh"
14
15#include <fstream>
16#include <string>
17
18namespace blender {
19
25class fstream : public std::fstream {
26 public:
27 fstream() = default;
28 explicit fstream(const char *filepath,
29 std::ios_base::openmode mode = ios_base::in | ios_base::out);
30 explicit fstream(const std::string &filepath,
31 std::ios_base::openmode mode = ios_base::in | ios_base::out);
32
33 void open(StringRefNull filepath, ios_base::openmode mode = ios_base::in | ios_base::out);
34};
35
36} // 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