45 OCTAVE_DISABLE_COPY_MOVE (
env)
49 static std::string polite_directory_format (
const std::string& name);
51 static bool absolute_pathname (
const std::string& s);
53 static bool rooted_relative_pathname (
const std::string& s);
55 static std::string base_pathname (
const std::string& s);
58 make_absolute (
const std::string& s,
59 const std::string& dot_path = get_current_directory ());
61 static std::string get_current_directory ();
63 static std::string get_home_directory ();
65 static std::string get_temp_directory ();
67 static std::string get_user_config_directory ();
69 static std::string get_user_data_directory ();
71 static std::string get_program_name ();
73 static std::string get_program_invocation_name ();
75 static std::string get_user_name ();
77 static std::string get_host_name ();
79 static std::string getenv (
const std::string& name);
81 static bool isenv (
const std::string& name);
83 static void putenv (
const std::string& name,
const std::string& value);
85 static bool have_x11_display ();
87 static bool chdir (
const std::string& newdir);
89 static void set_program_name (
const std::string& s);
93 static bool instance_ok ();
95 std::string do_polite_directory_format (
const std::string& name);
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 ();
108 std::string do_get_home_directory ();
110 std::string do_get_temp_directory ()
const;
112 std::string do_get_user_config_directory ();
114 std::string do_get_user_data_directory ();
116 std::string do_get_user_name ();
118 std::string do_get_host_name ();
120 std::string do_getenv (
const std::string& name)
const;
122 void do_putenv (
const std::string& name,
const std::string& value)
const;
124 bool do_chdir (
const std::string& newdir);
126 void do_set_program_name (
const std::string& s);
128 void pathname_backup (std::string& path,
int n)
const;
130 void error (
int)
const;
132 void error (
const std::string&)
const;
135 static env *s_instance;
137 static void cleanup_instance ()
138 {
delete s_instance; s_instance =
nullptr; }
142 bool m_follow_symbolic_links;
149 std::string m_current_directory;
152 std::string m_prog_name;
154 std::string m_prog_invocation_name;
156 std::string m_user_name;
158 std::string m_host_name;