1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-14 15:15:46 +01:00

Automagically generate DTDs. One more step towards dropping the chrome: protocol.

--HG--
rename : common/content/io.js => common/modules/io.jsm
This commit is contained in:
Kris Maglione
2011-01-03 21:11:28 -05:00
parent 30ec5fc393
commit 43458d4432
59 changed files with 553 additions and 463 deletions

View File

@@ -490,6 +490,21 @@ var File = Class("File", {
defaultEncoding: "UTF-8",
/**
* Expands "~" and environment variables in *path*.
*
* "~" is expanded to to the value of $HOME. On Windows if this is not
* set then the following are tried in order:
* $USERPROFILE
* ${HOMDRIVE}$HOMEPATH
*
* The variable notation is $VAR (terminated by a non-word character)
* or ${VAR}. %VAR% is also supported on Windows.
*
* @param {string} path The unexpanded path string.
* @param {boolean} relative Whether the path is relative or absolute.
* @returns {string}
*/
expandPath: function (path, relative) {
function getenv(name) services.environment.get(name);