]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.h
The LyXRC::prepend_path patch as tested on the Mac by Andreas.
[lyx.git] / src / support / filetools.h
index 29069f88b89285fac3299e19d6cf69d23afc5c47..69b5fb64084531c68c089658443d49b52dcbf745 100644 (file)
@@ -123,6 +123,24 @@ std::string const GetEnv(std::string const & envname);
  */
 std::vector<std::string> const getEnvPath(std::string const & name);
 
+/** Set the contents of the environment variable \c name
+ *  using the paths stored in the \c env vector.
+ *  Each element is passed through os::external_path.
+ */
+void setEnvPath(std::string const & name, std::vector<std::string> const & env);
+
+/** Prepend a list of paths to that returned by the environment variable.
+ *  Identical paths occurring later in the list are removed.
+ *  @param name the name of the environment variable.
+ *  @prefix the list of paths in OS-native syntax.
+ *  Eg "/foo/bar:/usr/bin:/usr/local/bin" on *nix,
+ *     "C:\foo\bar;C:\windows" on Windows.
+ */
+void prependEnvPath(std::string const & name, std::string const & prefix);
+
+/// Set an environment variable using a string of the form "name=FOO".
+bool putEnv(std::string const & envstr);
+
 /// Substitutes active latex characters with underscores in filename
 std::string const MakeLatexName(std::string const & file);