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