Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public LocalCacheResolver(GVFSEnlistment enlistment, PhysicalFileSystem fileSystem = null)
 {
     this.fileSystem = fileSystem ?? new PhysicalFileSystem();
     this.enlistment = enlistment;
 }