#include <cstdlib>
#include <locale>
#include <codecvt>
#include "dir-ops.h"
#include "file-ops.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) |
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 (void) |
std::string | getenv_wrapper (const std::string &name) |
std::ifstream | ifstream (const std::string &filename, const std::ios::openmode mode) |
std::ofstream | ofstream (const std::string &filename, const std::ios::openmode mode) |
void | putenv_wrapper (const std::string &name, const std::string &value) |
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) |
int chdir | ( | const std::string & | path_arg | ) |
Definition at line 106 of file lo-sysdep.cc.
References octave_chdir_wrapper(), and tilde_expand().
Referenced by interpreter::chdir(), env::do_chdir(), and octave_chdir_wrapper().
std::FILE* fopen | ( | const std::string & | filename, |
const std::string & | mode | ||
) |
Definition at line 314 of file lo-sysdep.cc.
References u8_to_wstring().
Referenced by do_stream_open(), F__delaunayn__(), fopen_tmp(), QConsolePrivate::log(), and load_path::read_dir_config().
std::FILE* fopen_tmp | ( | const std::string & | name, |
const std::string & | mode | ||
) |
Definition at line 386 of file lo-sysdep.cc.
References fopen(), and octave_unlink_wrapper().
Referenced by Ftmpfile().
std::fstream fstream | ( | const std::string & | filename, |
const std::ios::openmode | mode | ||
) |
Definition at line 410 of file lo-sysdep.cc.
References u8_to_wstring().
Referenced by history_system::do_edit_history().
std::string get_ASCII_filename | ( | const std::string & | orig_file_name, |
const bool | allow_locale | ||
) |
Definition at line 605 of file lo-sysdep.cc.
References canonicalize_file_name(), dir_sep_chars, dir_sep_str(), free(), hash(), mkdir(), OCTAVE_LOCAL_BUFFER, octave_locale_charset_wrapper(), octave_u8_conv_to_encoding_strict(), u8_from_wstring(), u8_to_wstring(), and unlink().
Referenced by ft_manager::do_get_font(), F__magick_ping__(), load_save_system::get_file_format(), hdf5_fstreambase::open_create(), read_file(), and load_save_system::save().
bool get_dirlist | ( | const std::string & | dirname, |
string_vector & | dirlist, | ||
std::string & | msg | ||
) |
Definition at line 119 of file lo-sysdep.cc.
References dir_entry::close(), dirname(), dir_entry::error(), dir_entry::read(), u8_from_wstring(), and u8_to_wstring().
Referenced by Freaddir(), genpath(), load_path::dir_info::get_file_list(), base_url_transfer::mput_directory(), recursive_rmdir(), and xzip().
std::string getcwd | ( | void | ) |
Definition at line 71 of file lo-sysdep.cc.
References free(), octave_getcwd_wrapper(), and u8_from_wstring().
Referenced by env::do_getcwd(), and octave_getcwd_wrapper().
std::string getenv_wrapper | ( | const std::string & | name | ) |
Definition at line 488 of file lo-sysdep.cc.
References u8_from_wstring(), and u8_to_wstring().
Referenced by env::do_getenv().
std::ifstream ifstream | ( | const std::string & | filename, |
const std::ios::openmode | mode | ||
) |
Definition at line 424 of file lo-sysdep.cc.
References u8_to_wstring().
Referenced by check_gzip_magic(), do_dbtype(), F__ftp_mput__(), Fdlmread(), load_save_system::get_file_format(), get_file_line(), load_save_system::load(), base_url_transfer::mput_directory(), read_classpath_txt(), JVMArgs::read_java_opts(), latex_renderer::render(), and file_info::snarf_file().
std::ofstream ofstream | ( | const std::string & | filename, |
const std::ios::openmode | mode | ||
) |
Definition at line 438 of file lo-sysdep.cc.
References u8_to_wstring().
Referenced by load_save_system::dump_octave_core(), F__ftp_mget__(), Furlwrite(), main(), base_url_transfer::mget_directory(), mk_tmp_hist_file(), load_save_system::save(), diary_buf::sync(), and latex_renderer::write_tex_file().
void putenv_wrapper | ( | const std::string & | name, |
const std::string & | value | ||
) |
Definition at line 452 of file lo-sysdep.cc.
References len, malloc(), octave_putenv_wrapper(), and u8_to_wstring().
Referenced by env::putenv(), and unsetenv_wrapper().
int system | ( | const std::string & | cmd_str | ) |
Definition at line 59 of file lo-sysdep.cc.
References u8_to_wstring().
Referenced by resource_manager::config_translators(), history_system::do_edit_history(), Fsystem(), and run_command().
std::string u8_from_wstring | ( | const std::wstring & | wchar_string | ) |
Definition at line 537 of file lo-sysdep.cc.
Referenced by canonicalize_file_name(), env::do_get_user_config_directory(), env::do_get_user_data_directory(), get_ASCII_filename(), get_dirlist(), getcwd(), getenv_wrapper(), and base_tm::init().
std::wstring u8_to_wstring | ( | const std::string & | utf8_string | ) |
Definition at line 514 of file lo-sysdep.cc.
Referenced by canonicalize_file_name(), drive_or_unc_share(), F__open_with_system_app__(), Fdlmread(), fopen(), fstream(), get_ASCII_filename(), get_dirlist(), getenv_wrapper(), ifstream(), ofstream(), popen(), putenv_wrapper(), READABLE(), rename(), same_file_internal(), system(), unsetenv_wrapper(), and windows_glob().
int unsetenv_wrapper | ( | const std::string & | name | ) |
Definition at line 501 of file lo-sysdep.cc.
References octave_unsetenv_wrapper(), putenv_wrapper(), and u8_to_wstring().
Referenced by Funsetenv().