Getting File Thumbnails using GDScript

Godot Version

4.2.stable

Question

Hello there, my question is : How can I get and save the file thumbnails using gdscript?
I have searched google and this forum for any help but couldn’t find any so I am making my own post. I hope that someone can help me!

Kind regards
Mindful

this might give you some idea^