예제 #1
0
 /// <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);
 }
예제 #2
0
파일: FS.cs 프로젝트: thild/monodevelop
 /// <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);
 }
예제 #3
0
 /// <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);
 }
예제 #4
0
 /// <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);
 }
예제 #5
0
 /// <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);
 }
예제 #6
0
 /// <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;
 }