Please explain: scope resolution

Please explain in a very simple words these lines from some code example:
( Which SD library to create file with date? - #4 by fat16lib - Storage - Arduino Forum )

#include <SD.h>
....
void Setup() {
....
SdFile::dateTimeCallback(dateTime); 
}

this is what is confusing me:

  1. What is 'SdFile' here and how is it related to SD library?
    The first line includes SD library; Is SDFile some member or class or whatnot from that library?

  2. What exactly means a syntax like 'SdFile::'?
    can it be replaced with, f.e. 'SDFile.'?

I see this used when creating a library, f.e.

void Morse::dot()

and it just means that dot() is a part of Morse class. But as I understand, this is used only when making library code; when we are using this library in a sketch, we use 'dot' notation, like

#include <Morse.h>
Morse morse(13);
void setup()
{
}
void loop()
{
  morse.dot();
}

So I probably understand that the code above passes callback function dateTime to dateTimeCallback(function?), defined within (SD? SDFile?)

So what exactly is the need of using SdFile::dateTimeCallback instead of
SdFile.dateTimeCallback?

  1. What is 'SdFile' here and how is it related to SD library?

The SdFile class is part of the SD library.

  1. What exactly means a syntax like 'SdFile::'?

It means calling a class method of the SdFile class.

can it be replaced with, f.e. 'SDFile.'?

No, because that would call an object method and for that you have to create an instantiation of the class (an object) first.

Class methods are used for changing values that exist only once, object methods are used to change values (or act otherwise on it) of the specific object, of which many can exist. So class variables are shared among all objects of that class but object values are kind of private property of that object.

It means calling a class method of the SdFile class.

Specifically, it means calling a static method of the class.

A static method is not unique to an instance of the class. Other methods are.

Writing to a file, for instance, is something that depends on which file (which instance of the SdFile class) you are trying to write to.

Setting up a callback, so the SdFile class knows what time it is, is not something that one instance of the SdFile class wants to do different from any other instance. So, the method is static (shared by all instances).

Therefore, the scope resolution operator is needed, to tell the class, not an instance of the class, to do something.