How to add 'open folder as root' in Elementary OS file manager context menu?

In order to create 'Open folder as root' context menu command - and in order to create any new such command - a new *.contract file has to be created in /usr/share/contractor.

To create the file in gedit:

sudo gedit /usr/share/contractor/Open_as_admin.contract

For 'Open folder as root' - that file would have to contain something like

[Contractor Entry]
Name=Open folder as root
Icon=gksu-root-terminal
Description=Open folder as root
MimeType=inode;application/x-sh;application/x-executable;
Exec=gksudo pantheon-files -d %U
Gettext-Domain=pantheon-files

(but no icon appears in te context menu anyway)

enter image description here


[Contractor Entry]
Name=Open folder as root
Icon=gksu-root-terminal
Description=Open folder as root
MimeType=inode;application/x-sh;application/x-executable;
Exec=/usr/bin/io.elementary.files-pkexec
Gettext-Domain=pantheon-files

This worked for me in Elementary OS 5 Juno 01/20/2019. Also, use nano instead of gedit.