/// <summary>Determine the user's home directory (location where preferences are).</summary> /// <remarks> /// Determine the user's home directory (location where preferences are). /// <p> /// This method can be expensive on the first invocation if path name /// translation is required. Subsequent invocations return a cached result. /// <p> /// Not all platforms and JREs require path name translation. Currently only /// Cygwin on Win32 requires translation of the Cygwin HOME directory. /// </remarks> /// <returns>the user's home directory; null if the user does not have one.</returns> public virtual FilePath UserHome() { FS.Holder <FilePath> p = userHome; if (p == null) { p = new FS.Holder <FilePath>(UserHomeImpl()); userHome = p; } return(p.value); }
/// <returns>the $prefix directory C Git would use.</returns> public virtual FilePath GitPrefix() { FS.Holder <FilePath> p = gitPrefix; if (p == null) { p = new FS.Holder <FilePath>(DiscoverGitPrefix()); gitPrefix = p; } return(p.value); }
/// <returns>the $prefix directory C Git would use.</returns> public virtual FilePath GitPrefix() { FS.Holder <FilePath> p = gitPrefix; if (p == null) { string overrideGitPrefix = SystemReader.GetInstance().GetProperty("jgit.gitprefix" ); if (overrideGitPrefix != null) { p = new FS.Holder <FilePath>(new FilePath(overrideGitPrefix)); } else { p = new FS.Holder <FilePath>(DiscoverGitPrefix()); } gitPrefix = p; } return(p.value); }
/// <summary>Set the $prefix directory C Git uses.</summary> /// <remarks>Set the $prefix directory C Git uses.</remarks> /// <param name="path">the directory. Null if C Git is not installed.</param> /// <returns> /// /// <code>this</code> /// </returns> public virtual NGit.Util.FS SetGitPrefix(FilePath path) { gitPrefix = new FS.Holder <FilePath>(path); return(this); }
/// <summary>Set the user's home directory location.</summary> /// <remarks>Set the user's home directory location.</remarks> /// <param name="path"> /// the location of the user's preferences; null if there is no /// home directory for the current user. /// </param> /// <returns> /// /// <code>this</code> /// . /// </returns> public virtual NGit.Util.FS SetUserHome(FilePath path) { userHome = new FS.Holder <FilePath>(path); return(this); }
/// <summary>Initialize this FS using another's current settings.</summary> /// <remarks>Initialize this FS using another's current settings.</remarks> /// <param name="src">the source FS to copy from.</param> protected internal FS(NGit.Util.FS src) { // Do nothing by default. userHome = src.userHome; gitPrefix = src.gitPrefix; }