GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
lo-sysdep.h File Reference
#include "octave-config.h"
#include <fstream>
#include <string>
#include <sys/types.h>
#include "lo-ieee.h"

Go to the source code of this file.

Functions

int chdir (const std::string &)
 
bool dir_exists (const std::string &dirname)
 
bool dir_exists (const std::string &dirname, std::string &msg)
 
bool file_exists (const std::string &filename, bool is_dir, std::string &msg)
 
bool file_exists (const std::string &filename, bool is_dir=true)
 
std::FILE * fopen (const std::string &name, const std::string &mode)
 
std::FILE * fopen_tmp (const std::string &name, const std::string &mode)
 
std::fstream fstream (const std::string &name, const std::ios::openmode mode=std::ios::in|std::ios::out)
 
std::string get_ASCII_filename (const std::string &long_file_name, const bool allow_locale=false)
 
bool get_dirlist (const std::string &dirname, string_vector &dirlist, std::string &msg)
 
std::string getcwd ()
 
std::string getenv_wrapper (const std::string &)
 
std::ifstream ifstream (const std::string &name, const std::ios::openmode mode=std::ios::in)
 
bool isenv_wrapper (const std::string &)
 
std::ofstream ofstream (const std::string &name, const std::ios::openmode mode=std::ios::out)
 
void putenv_wrapper (const std::string &name, const std::string &value)
 
bool same_file (const std::string &f, const std::string &g)
 
int system (const std::string &cmd_str)
 
std::string u8_from_wstring (const std::wstring &)
 
std::wstring u8_to_wstring (const std::string &)
 
int unsetenv_wrapper (const std::string &)
 

Function Documentation

◆ chdir()

int chdir ( const std::string &  path_arg)

◆ dir_exists() [1/2]

◆ dir_exists() [2/2]

bool dir_exists ( const std::string &  dirname,
std::string &  msg 
)

◆ file_exists() [1/2]

bool file_exists ( const std::string &  filename,
bool  is_dir,
std::string &  msg 
)

◆ file_exists() [2/2]

bool file_exists ( const std::string &  filename,
bool  is_dir = true 
)

◆ fopen()

std::FILE* fopen ( const std::string &  name,
const std::string &  mode 
)

Definition at line 511 of file lo-sysdep.cc.

References u8_to_wstring().

Referenced by fopen_tmp(), and load_path::read_dir_config().

◆ fopen_tmp()

std::FILE* fopen_tmp ( const std::string &  name,
const std::string &  mode 
)

Definition at line 583 of file lo-sysdep.cc.

References fopen(), and octave_unlink_wrapper().

◆ fstream()

std::fstream fstream ( const std::string &  name,
const std::ios::openmode  mode = std::ios::in|std::ios::out 
)

Definition at line 607 of file lo-sysdep.cc.

References u8_to_wstring().

◆ get_ASCII_filename()

◆ get_dirlist()

bool get_dirlist ( const std::string &  dirname,
string_vector dirlist,
std::string &  msg 
)

◆ getcwd()

std::string getcwd ( )

Definition at line 72 of file lo-sysdep.cc.

References free(), octave_getcwd_wrapper(), and u8_from_wstring().

Referenced by octave_getcwd_wrapper().

◆ getenv_wrapper()

std::string getenv_wrapper ( const std::string &  name)

Definition at line 685 of file lo-sysdep.cc.

References u8_from_wstring(), and u8_to_wstring().

◆ ifstream()

std::ifstream ifstream ( const std::string &  name,
const std::ios::openmode  mode = std::ios::in 
)

Definition at line 621 of file lo-sysdep.cc.

References u8_to_wstring().

Referenced by octave::F__ftp_mput__(), and base_url_transfer::mput_directory().

◆ isenv_wrapper()

bool isenv_wrapper ( const std::string &  name)

Definition at line 711 of file lo-sysdep.cc.

References u8_to_wstring().

Referenced by env::isenv().

◆ ofstream()

std::ofstream ofstream ( const std::string &  name,
const std::ios::openmode  mode = std::ios::out 
)

◆ putenv_wrapper()

void putenv_wrapper ( const std::string &  name,
const std::string &  value 
)

Definition at line 649 of file lo-sysdep.cc.

References len, malloc(), octave_putenv_wrapper(), and u8_to_wstring().

Referenced by env::putenv(), and unsetenv_wrapper().

◆ same_file()

bool same_file ( const std::string &  f,
const std::string &  g 
)

Definition at line 437 of file lo-sysdep.cc.

◆ system()

int system ( const std::string &  cmd_str)

Definition at line 60 of file lo-sysdep.cc.

References u8_to_wstring().

◆ u8_from_wstring()

std::string u8_from_wstring ( const std::wstring &  wchar_string)

◆ u8_to_wstring()

◆ unsetenv_wrapper()

int unsetenv_wrapper ( const std::string &  name)

Definition at line 698 of file lo-sysdep.cc.

References octave_unsetenv_wrapper(), putenv_wrapper(), and u8_to_wstring().

Referenced by octave::Funsetenv().