GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
lo-sysdep.cc File Reference
#include <cstdlib>
#include <locale>
#include <codecvt>
#include "dir-ops.h"
#include "file-ops.h"
#include "file-stat.h"
#include "lo-error.h"
#include "lo-sysdep.h"
#include "localcharset-wrapper.h"
#include "putenv-wrapper.h"
#include "unistd-wrappers.h"
#include "unsetenv-wrapper.h"

Go to the source code of this file.

Functions

int chdir (const std::string &path_arg)
 
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)
 
bool file_exists (const std::string &filename, bool is_dir, std::string &msg)
 
std::FILE * fopen (const std::string &filename, const std::string &mode)
 
std::FILE * fopen_tmp (const std::string &name, const std::string &mode)
 
std::fstream fstream (const std::string &filename, const std::ios::openmode mode)
 
std::string get_ASCII_filename (const std::string &orig_file_name, const bool allow_locale)
 
bool get_dirlist (const std::string &dirname, string_vector &dirlist, std::string &msg)
 
std::string getcwd ()
 
std::string getenv_wrapper (const std::string &name)
 
std::ifstream ifstream (const std::string &filename, const std::ios::openmode mode)
 
bool isenv_wrapper (const std::string &name)
 
std::ofstream ofstream (const std::string &filename, const std::ios::openmode mode)
 
void putenv_wrapper (const std::string &name, const std::string &value)
 
bool same_file (const std::string &file1, const std::string &file2)
 
int system (const std::string &cmd_str)
 
std::string u8_from_wstring (const std::wstring &wchar_string)
 
std::wstring u8_to_wstring (const std::string &utf8_string)
 
int unsetenv_wrapper (const std::string &name)
 

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 
)

◆ file_exists() [2/2]

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

◆ fopen()

std::FILE* fopen ( const std::string &  filename,
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 &  filename,
const std::ios::openmode  mode 
)

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 &  filename,
const std::ios::openmode  mode 
)

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 &  filename,
const std::ios::openmode  mode 
)

◆ 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 &  file1,
const std::string &  file2 
)

◆ 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().