44 OCTAVE_DISABLE_COPY_MOVE (
env)
48 static std::string polite_directory_format (
const std::string& name);
50 static bool absolute_pathname (
const std::string& s);
52 static bool rooted_relative_pathname (
const std::string& s);
54 static std::string base_pathname (
const std::string& s);
57 make_absolute (
const std::string& s,
58 const std::string& dot_path = get_current_directory ());
60 static std::string get_current_directory ();
62 static std::string get_home_directory ();
64 static std::string get_temp_directory ();
66 static std::string get_user_config_directory ();
68 static std::string get_user_data_directory ();
70 static std::string get_program_name ();
72 static std::string get_program_invocation_name ();
74 static std::string get_user_name ();
76 static std::string get_host_name ();
78 static std::string getenv (
const std::string& name);
80 static bool isenv (
const std::string& name);
82 static void putenv (
const std::string& name,
const std::string& value);
84 static bool have_x11_display ();
86 static bool chdir (
const std::string& newdir);
88 static void set_program_name (
const std::string& s);
92 static bool instance_ok ();
94 std::string do_polite_directory_format (
const std::string& name);
96 bool do_absolute_pathname (
const std::string& s)
const;
98 bool do_rooted_relative_pathname (
const std::string& s)
const;
100 std::string do_base_pathname (
const std::string& s)
const;
102 std::string do_make_absolute (
const std::string& s,
103 const std::string& dot_path)
const;
105 std::string do_getcwd ();
107 std::string do_get_home_directory ();
109 std::string do_get_temp_directory ()
const;
111 std::string do_get_user_config_directory ();
113 std::string do_get_user_data_directory ();
115 std::string do_get_user_name ();
117 std::string do_get_host_name ();
119 std::string do_getenv (
const std::string& name)
const;
121 void do_putenv (
const std::string& name,
const std::string& value)
const;
123 bool do_chdir (
const std::string& newdir);
125 void do_set_program_name (
const std::string& s);
127 void pathname_backup (std::string& path,
int n)
const;
129 void error (
int)
const;
131 void error (
const std::string&)
const;
134 static env *s_instance;
136 static void cleanup_instance ()
137 {
delete s_instance; s_instance =
nullptr; }
141 bool m_follow_symbolic_links;
148 std::string m_current_directory;
151 std::string m_prog_name;
153 std::string m_prog_invocation_name;
155 std::string m_user_name;
157 std::string m_host_name;