Inheritance VS DelegateClass

Im trying to understand why TempFile extends from DelegateClass(File)
instead of just file.

Is it because they didn’t want all the functions that come with the File
class and just limit it.

Why even have the DelegateClass, why not just inherit from the class. I
know I’m missing something, just not quite sure what.