public GVFSContext(ITracer tracer, PhysicalFileSystem fileSystem, GitRepo repository, GVFSEnlistment enlistment) { this.Tracer = tracer; this.FileSystem = fileSystem; this.Enlistment = enlistment; this.Repository = repository; this.Unattended = GVFSEnlistment.IsUnattended(this.Tracer); }
public static bool TryGetDefaultLocalCacheRoot(GVFSEnlistment enlistment, out string localCacheRoot, out string localCacheRootError) { if (GVFSEnlistment.IsUnattended(tracer: null)) { localCacheRoot = Path.Combine(enlistment.DotGVFSRoot, GVFSConstants.DefaultGVFSCacheFolderName); localCacheRootError = null; return(true); } return(GVFSPlatform.Instance.TryGetDefaultLocalCacheRoot(enlistment.EnlistmentRoot, out localCacheRoot, out localCacheRootError)); }
public static string GetDefaultLocalCacheRoot(GVFSEnlistment enlistment) { string localCacheRoot; if (GVFSEnlistment.IsUnattended(tracer: null)) { localCacheRoot = Path.Combine(enlistment.DotGVFSRoot, DefaultGVFSCacheFolderName); } else { string pathRoot = Path.GetPathRoot(enlistment.EnlistmentRoot); localCacheRoot = Path.Combine(pathRoot, DefaultGVFSCacheFolderName); } return(localCacheRoot); }
public static bool TryGetDefaultLocalCacheRoot(GVFSEnlistment enlistment, out string localCacheRoot, out string errorMessage) { localCacheRoot = null; errorMessage = string.Empty; if (GVFSEnlistment.IsUnattended(tracer: null)) { localCacheRoot = Path.Combine(enlistment.DotGVFSRoot, DefaultGVFSCacheFolderName); } else { string pathRoot; if (!Paths.TryGetPathRoot(enlistment.EnlistmentRoot, out pathRoot, out errorMessage)) { return(false); } localCacheRoot = Path.Combine(pathRoot, DefaultGVFSCacheFolderName); } return(true); }