Is it possible to insert icons on folders with the "gio set" command?

On Ubuntu 16.04 I used the following command to insert icons on my folders and it worked fine:

gvfs-set-attribute -t string folderIWishToInsertIcon metadata::custom-icon "file:///home/myUser/myIcon.png"

After upgrading to Ubuntu 18.04 this command still works fine but now I receive a message saying that it's a deprecated tool and it recommends me to use gio set instead :

ramuyko@myPC:~$ gvfs-set-attribute -t string folderIWishToInsertIcon metadata::custom-icon "file:///home/myUser/myIcon.png"
This tool has been deprecated, use 'gio set' instead.
See 'gio help set' for more info.

I've seen gio's man page and tried to insert icons on my folders with the gio set command but I didn't succeed using the right parameters. Does anyone know if it's possible and how to do it?


Solution 1:

As solved in the comments, gio set command uses same form of parameters that the gvfs-set-attribute uses, except set in gio is a separate command-line parameter, instead of gvfs-set-attribute being one whole comman. Thus the proper command should be:

gio set -t 'string' folderIWishToInsertIcon 'metadata::custom-icon' 'file:///home/myUser/myIcon.png'