GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
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)
extern

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

References octave_chdir_wrapper().

Referenced by octave_chdir_wrapper().

◆ dir_exists() [1/2]

bool dir_exists ( const std::string &  dirname)
extern

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

References dirname(), base_file_stat::is_dir(), and u8_to_wstring().

◆ dir_exists() [2/2]

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

◆ file_exists() [1/2]

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

◆ file_exists() [2/2]

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

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

References base_file_stat::is_dir(), base_file_stat::is_reg(), and u8_to_wstring().

Referenced by rename().

◆ fopen()

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

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

References u8_to_wstring().

◆ fopen_tmp()

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

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

References octave_unlink_wrapper().

◆ fstream()

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

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

References u8_to_wstring().

◆ get_ASCII_filename()

std::string get_ASCII_filename ( const std::string &  long_file_name,
const bool  allow_locale = false 
)
extern

◆ get_dirlist()

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

◆ getcwd()

std::string getcwd ( )
extern

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)
extern

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 
)
extern

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

References u8_to_wstring().

◆ isenv_wrapper()

bool isenv_wrapper ( const std::string &  name)
extern

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 
)
extern

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

References u8_to_wstring().

◆ putenv_wrapper()

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

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

References len, 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 
)
extern

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

◆ system()

int system ( const std::string &  cmd_str)
extern

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)
extern

◆ u8_to_wstring()

◆ unsetenv_wrapper()

int unsetenv_wrapper ( const std::string &  name)
extern

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

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