1 const GLib = imports.gi.GLib;
3 const File = imports['../File.js'].File;
8 forHost: function(name)
11 return this._data[name];
13 throw "Host " + name + " was not found in netrc file (or parser could not read file..)\n";
20 * private - called at the bottom..
25 var netrc = File.read(GLib.get_home_dir() + "/.netrc");
27 netrc.split("\n").forEach(function(nl) {
31 nl.replace(/\s+$/,'').replace(/^\s+/,'').split(/\s+/).forEach(function(kv) {
41 authdata[line.machine] = line;
44 this._data = authdata;