#include "oct-env.h"
Public Member Functions | |
env (const env &)=delete | |
env & | operator= (const env &)=delete |
Static Public Member Functions | |
static bool | absolute_pathname (const std::string &s) |
static std::string | base_pathname (const std::string &s) |
static bool | chdir (const std::string &newdir) |
static std::string | get_current_directory (void) |
static std::string | get_home_directory (void) |
static std::string | get_host_name (void) |
static std::string | get_program_invocation_name (void) |
static std::string | get_program_name (void) |
static std::string | get_temp_directory (void) |
static std::string | get_user_config_directory (void) |
static std::string | get_user_data_directory (void) |
static std::string | get_user_name (void) |
static std::string | getenv (const std::string &name) |
static bool | have_x11_display (void) |
static std::string | make_absolute (const std::string &s, const std::string &dot_path=get_current_directory()) |
static std::string | polite_directory_format (const std::string &name) |
static void | putenv (const std::string &name, const std::string &value) |
static bool | rooted_relative_pathname (const std::string &s) |
static void | set_program_name (const std::string &s) |
Protected Member Functions | |
env (void) | |
Private Member Functions | |
bool | do_absolute_pathname (const std::string &s) const |
std::string | do_base_pathname (const std::string &s) const |
bool | do_chdir (const std::string &newdir) |
std::string | do_get_home_directory (void) |
std::string | do_get_host_name (void) |
std::string | do_get_temp_directory (void) const |
std::string | do_get_user_config_directory (void) |
std::string | do_get_user_data_directory (void) |
std::string | do_get_user_name (void) |
std::string | do_getcwd (void) |
std::string | do_getenv (const std::string &name) const |
std::string | do_make_absolute (const std::string &s, const std::string &dot_path) const |
std::string | do_polite_directory_format (const std::string &name) |
void | do_putenv (const std::string &name, const std::string &value) const |
bool | do_rooted_relative_pathname (const std::string &s) const |
void | do_set_program_name (const std::string &s) |
void | error (const std::string &) const |
void | error (int) const |
void | pathname_backup (std::string &path, int n) const |
Static Private Member Functions | |
static void | cleanup_instance (void) |
static bool | instance_ok (void) |
Private Attributes | |
std::string | m_current_directory |
bool | m_follow_symbolic_links |
std::string | m_host_name |
std::string | m_prog_invocation_name |
std::string | m_prog_name |
std::string | m_user_name |
bool | m_verbatim_pwd |
Static Private Attributes | |
static env * | m_instance = nullptr |
|
protected |
Definition at line 72 of file oct-env.cc.
References do_get_host_name(), do_get_user_name(), and do_getcwd().
Referenced by instance_ok().
|
delete |
|
static |
Definition at line 110 of file oct-env.cc.
References do_absolute_pathname(), instance_ok(), and m_instance.
Referenced by kpse_absolute_p(), and load_fcn_from_file().
|
static |
Definition at line 124 of file oct-env.cc.
References do_base_pathname(), instance_ok(), and m_instance.
Referenced by F__parse_file__(), get_help_from_file(), and load_fcn_from_file().
|
static |
Definition at line 315 of file oct-env.cc.
References do_chdir(), instance_ok(), and m_instance.
|
inlinestaticprivate |
Definition at line 139 of file oct-env.h.
Referenced by instance_ok().
|
private |
Definition at line 377 of file oct-env.cc.
References octave::sys::file_ops::is_dir_sep(), and len.
Referenced by absolute_pathname(), do_base_pathname(), and do_make_absolute().
|
private |
Definition at line 426 of file oct-env.cc.
References octave::sys::file_ops::dir_sep_chars(), do_absolute_pathname(), and do_rooted_relative_pathname().
Referenced by base_pathname().
|
private |
Definition at line 598 of file oct-env.cc.
References octave::sys::chdir(), do_getcwd(), do_make_absolute(), octave::sys::file_ops::is_dir_sep(), m_current_directory, and m_follow_symbolic_links.
Referenced by chdir().
|
private |
Definition at line 534 of file oct-env.cc.
References octave::sys::password::dir(), octave::sys::file_ops::dir_sep_str(), do_getenv(), octave::sys::password::getpwuid(), and octave::sys::getuid().
Referenced by do_get_user_config_directory(), do_get_user_data_directory(), do_polite_directory_format(), and get_home_directory().
|
private |
Definition at line 574 of file oct-env.cc.
References m_host_name, and octave_gethostname_wrapper().
Referenced by env(), and get_host_name().
|
private |
Definition at line 208 of file oct-env.cc.
References do_getenv().
Referenced by get_temp_directory().
|
private |
Definition at line 247 of file oct-env.cc.
References octave::sys::file_ops::dir_sep_str(), do_get_home_directory(), do_getenv(), path, and octave::sys::u8_from_wstring().
Referenced by get_user_config_directory().
|
private |
Definition at line 268 of file oct-env.cc.
References config::data_dir(), octave::sys::file_ops::dir_sep_str(), do_get_home_directory(), do_getenv(), path, and octave::sys::u8_from_wstring().
Referenced by get_user_data_directory().
|
private |
Definition at line 561 of file oct-env.cc.
References octave::sys::password::getpwuid(), octave::sys::getuid(), m_user_name, and octave::sys::password::name().
Referenced by env(), and get_user_name().
|
private |
Definition at line 519 of file oct-env.cc.
References octave::sys::getcwd(), m_current_directory, m_follow_symbolic_links, and m_verbatim_pwd.
Referenced by env(), do_chdir(), and get_current_directory().
|
private |
Definition at line 589 of file oct-env.cc.
References octave::sys::getenv_wrapper(), and name.
Referenced by do_get_home_directory(), do_get_temp_directory(), do_get_user_config_directory(), do_get_user_data_directory(), and getenv().
|
private |
Definition at line 443 of file oct-env.cc.
References octave::sys::file_ops::dir_sep_chars(), octave::sys::file_ops::dir_sep_str(), do_absolute_pathname(), octave::sys::file_ops::is_dir_sep(), and pathname_backup().
Referenced by do_chdir(), and make_absolute().
|
private |
Definition at line 356 of file oct-env.cc.
References do_get_home_directory(), octave::sys::file_ops::is_dir_sep(), len, and name.
Referenced by polite_directory_format().
|
private |
|
private |
Definition at line 398 of file oct-env.cc.
References octave::sys::file_ops::is_dir_sep(), and len.
Referenced by do_base_pathname(), and rooted_relative_pathname().
|
private |
Definition at line 322 of file oct-env.cc.
References octave::sys::file_ops::dir_sep_chars(), m_prog_invocation_name, m_prog_name, octave_set_program_name_wrapper(), and octave::strsave().
Referenced by set_program_name().
|
private |
Definition at line 671 of file oct-env.cc.
|
private |
Definition at line 665 of file oct-env.cc.
|
static |
Definition at line 138 of file oct-env.cc.
References do_getcwd(), instance_ok(), and m_instance.
Referenced by initial_class_path().
|
static |
Definition at line 145 of file oct-env.cc.
References do_get_home_directory(), instance_ok(), and m_instance.
Referenced by initial_class_path(), kpse_tilde_expand(), octave::files_dock_widget::popdownmenu_home(), and octave::tilde_expand_word().
|
static |
Definition at line 201 of file oct-env.cc.
References do_get_host_name(), instance_ok(), and m_instance.
|
static |
Definition at line 180 of file oct-env.cc.
References instance_ok(), m_instance, and m_prog_invocation_name.
|
static |
Definition at line 173 of file oct-env.cc.
References instance_ok(), m_instance, and m_prog_name.
|
static |
Definition at line 152 of file oct-env.cc.
References do_get_temp_directory(), instance_ok(), and m_instance.
Referenced by octave::sys::tempnam().
|
static |
Definition at line 159 of file oct-env.cc.
References do_get_user_config_directory(), instance_ok(), and m_instance.
|
static |
Definition at line 166 of file oct-env.cc.
References do_get_user_data_directory(), instance_ok(), and m_instance.
|
static |
Definition at line 194 of file oct-env.cc.
References do_get_user_name(), instance_ok(), and m_instance.
|
static |
Definition at line 294 of file oct-env.cc.
References do_getenv(), instance_ok(), m_instance, and name.
Referenced by octave::base_qobject::base_qobject(), octave::curl_transfer::curl_transfer(), octave::latex_renderer::latex_renderer(), octave::ft_manager::do_get_font(), octave::resource_manager::get_default_font(), octave::resource_manager::get_default_font_family(), octave::resource_manager::get_gui_translation_dir(), have_gnuplot_binary(), have_x11_display(), octave::directory_path::init(), initial_java_dir(), initialize_jvm(), octave::resource_manager::reload_settings(), and octave::resource_manager::update_network_settings().
|
static |
Definition at line 307 of file oct-env.cc.
References getenv().
|
staticprivate |
Definition at line 89 of file oct-env.cc.
References env(), singleton_cleanup_list::add(), cleanup_instance(), and m_instance.
Referenced by absolute_pathname(), base_pathname(), chdir(), get_current_directory(), get_home_directory(), get_host_name(), get_program_invocation_name(), get_program_name(), get_temp_directory(), get_user_config_directory(), get_user_data_directory(), get_user_name(), getenv(), make_absolute(), polite_directory_format(), rooted_relative_pathname(), and set_program_name().
|
static |
Definition at line 131 of file oct-env.cc.
References do_make_absolute(), instance_ok(), and m_instance.
Referenced by octave::bp_file_info::bp_file_info(), F__parse_file__(), octave::file_editor::handle_file_remove(), load_fcn_from_file(), read_mat5_binary_element(), and octave::sys::file_stat::update_internal().
|
private |
Definition at line 633 of file oct-env.cc.
References octave::sys::file_ops::is_dir_sep(), min(), and path.
Referenced by do_make_absolute().
|
static |
Definition at line 103 of file oct-env.cc.
References do_polite_directory_format(), instance_ok(), m_instance, and name.
|
static |
Definition at line 301 of file oct-env.cc.
References name, and octave::sys::putenv_wrapper().
Referenced by octave::main_window::main_window(), and octave::resource_manager::update_network_settings().
|
static |
Definition at line 117 of file oct-env.cc.
References do_rooted_relative_pathname(), instance_ok(), and m_instance.
Referenced by kpse_absolute_p().
|
static |
Definition at line 187 of file oct-env.cc.
References do_set_program_name(), instance_ok(), and m_instance.
Referenced by main().
|
private |
Definition at line 151 of file oct-env.h.
Referenced by do_chdir(), and do_getcwd().
|
private |
Definition at line 144 of file oct-env.h.
Referenced by do_chdir(), and do_getcwd().
|
private |
Definition at line 160 of file oct-env.h.
Referenced by do_get_host_name().
|
staticprivate |
Definition at line 137 of file oct-env.h.
Referenced by absolute_pathname(), base_pathname(), chdir(), get_current_directory(), get_home_directory(), get_host_name(), get_program_invocation_name(), get_program_name(), get_temp_directory(), get_user_config_directory(), get_user_data_directory(), get_user_name(), getenv(), instance_ok(), make_absolute(), polite_directory_format(), rooted_relative_pathname(), and set_program_name().
|
private |
Definition at line 156 of file oct-env.h.
Referenced by do_set_program_name(), and get_program_invocation_name().
|
private |
Definition at line 154 of file oct-env.h.
Referenced by do_set_program_name(), and get_program_name().
|
private |
Definition at line 158 of file oct-env.h.
Referenced by do_get_user_name().
|
private |
Definition at line 148 of file oct-env.h.
Referenced by do_getcwd().