refresh() private method

private refresh ( ) : Host>.Dictionary
return Host>.Dictionary
Esempio n. 1
0
        /// <summary>
        /// Obtain the user's configuration data.
        /// <para/>
        /// The configuration file is always returned to the caller, even if no file
        /// exists in the user's home directory at the time the call was made. Lookup
        /// requests are cached and are automatically updated if the user modifies
        /// the configuration file since the last time it was cached.
        /// </summary>
        /// <returns>a caching reader of the user's configuration file.</returns>
        public static OpenSshConfig get()
        {
            DirectoryInfo home = FS.userHome() ?? new DirectoryInfo(Path.GetFullPath("."));

            FileInfo config = PathUtil.CombineFilePath(home, ".ssh" + Path.DirectorySeparatorChar + "config");
            var osc = new OpenSshConfig(home, config);
            osc.refresh();
            return osc;
        }
Esempio n. 2
0
        public static OpenSshConfig get()
        {
            DirectoryInfo home = FS.userHome() ?? new DirectoryInfo(Path.GetFullPath("."));

            FileInfo      config = new FileInfo(Path.Combine(home.FullName, ".ssh" + Path.DirectorySeparatorChar + "config"));
            OpenSshConfig osc    = new OpenSshConfig(home, config);

            osc.refresh();
            return(osc);
        }