GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
lo-sysdep.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1996-2021 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_lo_sysdep_h)
27 #define octave_lo_sysdep_h 1
28 
29 #include "octave-config.h"
30 
31 #include <fstream>
32 #include <string>
33 
34 #include <sys/types.h>
35 
36 #include "lo-ieee.h"
37 
38 class string_vector;
39 
40 namespace octave
41 {
42  namespace sys
43  {
44  extern std::string getcwd (void);
45 
46  extern int chdir (const std::string&);
47 
48  extern bool get_dirlist (const std::string& dirname, string_vector& dirlist,
49  std::string& msg);
50 
51  extern std::FILE * fopen (const std::string& name, const std::string& mode);
52 
53  extern std::fstream fstream (const std::string& name,
54  const std::ios::openmode mode =
55  std::ios::in | std::ios::out);
56 
57  extern std::ifstream ifstream (const std::string& name,
58  const std::ios::openmode mode = std::ios::in);
59 
60  extern std::ofstream ofstream (const std::string& name,
61  const std::ios::openmode mode = std::ios::out);
62 
63  extern void putenv_wrapper (const std::string& name,
64  const std::string& value);
65 
66  extern std::string getenv_wrapper (const std::string&);
67 
68  extern int unsetenv_wrapper (const std::string&);
69 
70  extern std::wstring u8_to_wstring (const std::string&);
71 
72  extern std::string u8_from_wstring (const std::wstring&);
73 
74  extern std::string get_ASCII_filename (const std::string& long_file_name);
75  }
76 }
77 
78 #endif
QString name
std::string dirname(const std::string &path)
Definition: file-ops.cc:363
std::string get_ASCII_filename(const std::string &orig_file_name)
Definition: lo-sysdep.cc:551
std::string getcwd(void)
Definition: lo-sysdep.cc:53
std::FILE * fopen(const std::string &filename, const std::string &mode)
Definition: lo-sysdep.cc:295
std::string u8_from_wstring(const std::wstring &wchar_string)
Definition: lo-sysdep.cc:490
int unsetenv_wrapper(const std::string &name)
Definition: lo-sysdep.cc:455
std::ifstream ifstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:381
int chdir(const std::string &path_arg)
Definition: lo-sysdep.cc:88
void putenv_wrapper(const std::string &name, const std::string &value)
Definition: lo-sysdep.cc:409
std::fstream fstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:367
std::string getenv_wrapper(const std::string &name)
Definition: lo-sysdep.cc:442
std::ofstream ofstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:395
bool get_dirlist(const std::string &dirname, string_vector &dirlist, std::string &msg)
Definition: lo-sysdep.cc:101
std::wstring u8_to_wstring(const std::string &utf8_string)
Definition: lo-sysdep.cc:468