GitSharp.Core.RefUpdate.DeleteStore.DeleteFileAndEmptyDir C# (CSharp) Method

DeleteFileAndEmptyDir() private static method

private static DeleteFileAndEmptyDir ( FileInfo file, int depth ) : void
file System.IO.FileInfo
depth int
return void
            private static void DeleteFileAndEmptyDir(FileInfo file, int depth)
            {
                if (!file.Exists) return;

                file.Delete();
                file.Refresh();
                if (file.Exists)
                {
                    throw new IOException("File cannot be deleted: " + file);
                }
                DeleteEmptyDir(file.Directory, depth);
            }