Beispiel #1
0
 public static bool     delete_Repository(this API_NGit nGit)
 {
     nGit.close();
     if (nGit.files_Location().valid())
     {
         var folderToDelete = nGit.git_Folder();
         if (folderToDelete.dirExists())
         {
             //need to make the repo files read/write before deleting the repo folder
             foreach (var file in folderToDelete.files(true))
             {
                 file.file_Attribute_ReadOnly_Remove();
             }
             return(Files.deleteFolder(folderToDelete, true));
         }
     }
     return(false);
 }
Beispiel #2
0
 public static string       git_Folder(this API_NGit nGit)
 {
     return(nGit.files_Location().pathCombine(".git"));
 }