GitCommands.Settings.ValidWorkingDir C# (CSharp) Méthode

ValidWorkingDir() public static méthode

public static ValidWorkingDir ( string dir ) : bool
dir string
Résultat bool
        public static bool ValidWorkingDir(string dir)
        {
            if (string.IsNullOrEmpty(dir))
                return false;

            if (Directory.Exists(dir + PathSeperator + ".git"))
                return true;

            return !dir.Contains(".git") &&
                   Directory.Exists(dir + PathSeperator + "info") &&
                   Directory.Exists(dir + PathSeperator + "objects") &&
                   Directory.Exists(dir + PathSeperator + "refs");
        }

Same methods

Settings::ValidWorkingDir ( ) : bool