26 #if ! defined (octave_oct_env_h)
27 #define octave_oct_env_h 1
29 #include "octave-config.h"
51 env& operator = (
const env&) =
delete;
53 static std::string polite_directory_format (
const std::string&
name);
57 static bool rooted_relative_pathname (
const std::string& s);
59 static std::string base_pathname (
const std::string& s);
63 const std::string& dot_path = get_current_directory ());
65 static std::string get_current_directory (
void);
67 static std::string get_home_directory (
void);
71 static std::string get_user_config_directory (
void);
73 static std::string get_program_name (
void);
75 static std::string get_program_invocation_name (
void);
77 static std::string get_user_name (
void);
79 static std::string get_host_name (
void);
81 static std::string getenv (
const std::string&
name);
83 static void putenv (
const std::string&
name,
const std::string& value);
85 static bool have_x11_display (
void);
87 static bool chdir (
const std::string& newdir);
89 static void set_program_name (
const std::string& s);
93 static bool instance_ok (
void);
95 std::string do_polite_directory_format (
const std::string&
name)
const;
97 bool do_absolute_pathname (
const std::string& s)
const;
99 bool do_rooted_relative_pathname (
const std::string& s)
const;
101 std::string do_base_pathname (
const std::string& s)
const;
103 std::string do_make_absolute (
const std::string& s,
104 const std::string& dot_path)
const;
106 std::string do_getcwd (
void)
const;
108 std::string do_get_home_directory (
void)
const;
110 std::string do_get_temp_directory (
void)
const;
112 std::string do_get_user_config_directory (
void)
const;
114 std::string do_get_user_name (
void)
const;
116 std::string do_get_host_name (
void)
const;
118 std::string do_getenv (
const std::string&
name)
const;
122 bool do_chdir (
const std::string& newdir);
124 void do_set_program_name (
const std::string& s)
const;
126 void pathname_backup (std::string&
path,
int n)
const;
128 void error (
int)
const;
130 void error (
const std::string&)
const;
std::string prog_invocation_name
bool follow_symbolic_links
static void cleanup_instance(void)
std::string current_directory
void do_putenv(const std::string &name, const std::string &value) const
void error(const char *fmt,...)
static std::string get_temp_directory(void)
int chdir(const std::string &path_arg)
static string_vector make_absolute(const string_vector &sv)
static bool absolute_pathname(const std::string &s)