Just in case anyone really wants to add something like this: The easiest way would probably be to go via GIO and gvfs.
Just in case anyone really wants to add something like this: The easiest way would probably be to go via GIO and gvfs.