GNU Octave 7.1.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-2022 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
38class string_vector;
39
40namespace octave
41{
42 namespace sys
43 {
44 extern OCTAVE_API int system (const std::string& cmd_str);
45
46 extern OCTAVE_API std::string getcwd (void);
47
48 extern OCTAVE_API int chdir (const std::string&);
49
50 extern OCTAVE_API bool
51 get_dirlist (const std::string& dirname, string_vector& dirlist,
52 std::string& msg);
53
54 extern OCTAVE_API std::FILE *
55 fopen (const std::string& name, const std::string& mode);
56
58 fstream (const std::string& name,
59 const std::ios::openmode mode = std::ios::in | std::ios::out);
60
62 ifstream (const std::string& name,
63 const std::ios::openmode mode = std::ios::in);
64
66 ofstream (const std::string& name,
67 const std::ios::openmode mode = std::ios::out);
68
69 extern OCTAVE_API void
70 putenv_wrapper (const std::string& name, const std::string& value);
71
72 extern OCTAVE_API std::string getenv_wrapper (const std::string&);
73
74 extern OCTAVE_API int unsetenv_wrapper (const std::string&);
75
76 extern OCTAVE_API std::wstring u8_to_wstring (const std::string&);
77
78 extern OCTAVE_API std::string u8_from_wstring (const std::wstring&);
79
80 extern OCTAVE_API std::string
81 get_ASCII_filename (const std::string& long_file_name,
82 const bool allow_locale = false);
83 }
84}
85
86#endif
QString name
#define OCTAVE_API
Definition: main.in.cc:55
std::string dirname(const std::string &path)
Definition: file-ops.cc:358
std::string getcwd(void)
Definition: lo-sysdep.cc:71
std::fstream fstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:386
std::ifstream ifstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:400
std::string u8_from_wstring(const std::wstring &wchar_string)
Definition: lo-sysdep.cc:513
int unsetenv_wrapper(const std::string &name)
Definition: lo-sysdep.cc:477
std::ofstream ofstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:414
std::wstring u8_to_wstring(const std::string &utf8_string)
Definition: lo-sysdep.cc:490
std::string getenv_wrapper(const std::string &name)
Definition: lo-sysdep.cc:464
std::string get_ASCII_filename(const std::string &orig_file_name, const bool allow_locale)
Definition: lo-sysdep.cc:581
void putenv_wrapper(const std::string &name, const std::string &value)
Definition: lo-sysdep.cc:428
bool get_dirlist(const std::string &dirname, string_vector &dirlist, std::string &msg)
Definition: lo-sysdep.cc:119
std::FILE * fopen(const std::string &filename, const std::string &mode)
Definition: lo-sysdep.cc:314
int system(const std::string &cmd_str)
Definition: lo-sysdep.cc:59
int chdir(const std::string &path_arg)
Definition: lo-sysdep.cc:106