GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
oct-sysdep.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 1996-2026 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_oct_sysdep_h)
27#define octave_oct_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
42
43extern OCTAVE_API int system (const std::string& cmd_str);
44
45extern OCTAVE_API std::string getcwd ();
46
47extern OCTAVE_API int chdir (const std::string&);
48
49extern OCTAVE_API bool
50get_dirlist (const std::string& dirname, string_vector& dirlist,
51 std::string& msg);
52
53extern OCTAVE_API bool
54file_exists (const std::string& filename, bool is_dir = true);
55
56extern OCTAVE_API bool
57file_exists (const std::string& filename, bool is_dir, std::string& msg);
58
59extern OCTAVE_API bool dir_exists (const std::string& dirname);
60
61extern OCTAVE_API bool
62dir_exists (const std::string& dirname, std::string& msg);
63
64extern OCTAVE_API bool
65same_file (const std::string& f, const std::string& g);
66
67extern OCTAVE_API std::FILE *
68fopen (const std::string& name, const std::string& mode);
69
70extern OCTAVE_API std::FILE *
71fopen_tmp (const std::string& name, const std::string& mode);
72
73extern OCTAVE_API std::fstream
74fstream (const std::string& name,
75 const std::ios::openmode mode = std::ios::in | std::ios::out);
76
77extern OCTAVE_API std::ifstream
78ifstream (const std::string& name,
79 const std::ios::openmode mode = std::ios::in);
80
81extern OCTAVE_API std::ofstream
82ofstream (const std::string& name,
83 const std::ios::openmode mode = std::ios::out);
84
85extern OCTAVE_API void
86putenv_wrapper (const std::string& name, const std::string& value);
87
88extern OCTAVE_API std::string getenv_wrapper (const std::string&);
89
90extern OCTAVE_API bool isenv_wrapper (const std::string&);
91
92extern OCTAVE_API int unsetenv_wrapper (const std::string&);
93
94extern OCTAVE_API std::wstring u8_to_wstring (const std::string&);
95
96extern OCTAVE_API std::string u8_from_wstring (const std::wstring&);
97
98extern OCTAVE_API std::string
99get_ASCII_filename (const std::string& long_file_name,
100 const bool allow_locale = false);
101
102OCTAVE_END_NAMESPACE(sys)
103OCTAVE_END_NAMESPACE(octave)
104
105#endif
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::string dirname(const std::string &path)
Definition file-ops.cc:369
#define OCTAVE_API
Definition main.in.cc:55
std::ifstream ifstream(const std::string &name, const std::ios::openmode mode=std::ios::in)
int system(const std::string &cmd_str)
Definition oct-sysdep.cc:63
int chdir(const std::string &)
bool isenv_wrapper(const std::string &)
bool dir_exists(const std::string &dirname)
bool file_exists(const std::string &filename, bool is_dir=true)
std::string u8_from_wstring(const std::wstring &)
std::FILE * fopen_tmp(const std::string &name, const std::string &mode)
std::ofstream ofstream(const std::string &name, const std::ios::openmode mode=std::ios::out)
std::wstring u8_to_wstring(const std::string &)
std::string getcwd()
std::FILE * fopen(const std::string &name, const std::string &mode)
std::string get_ASCII_filename(const std::string &long_file_name, const bool allow_locale=false)
void putenv_wrapper(const std::string &name, const std::string &value)
bool get_dirlist(const std::string &dirname, string_vector &dirlist, std::string &msg)
int unsetenv_wrapper(const std::string &)
std::string getenv_wrapper(const std::string &)
bool same_file(const std::string &f, const std::string &g)
F77_RET_T const F77_DBLE const F77_DBLE * f