I am stuck in a point that should be easy but I couldn't figure it out.
To make a long story short; I uploaded manually some images to the public directory and now I want to register them as managed files but I am stuck for some time where I couldn't figure out how to do it.
I tried using
system_retrieve_file but it seems to accept only URLs not local paths
public:// as it uses cURL to get the file
Also, I tried using
file_save_data with no luck as well for the same mentioned points.