I am trying to make a simple commandline client for accessing shares via the python bindings of gio (yes, the main requirement is to use gio).
I can see that comparing with it's predecessor genome-vfs, it provides some means to do authentication stuff (subclassing MountOperation
), and even some methods which are quite specific to samba shares, like set_domain()
.
But I'm stuck with this code:
import gio
fh = gio.File("smb://server_name/")
If that server needs authenticacion, I suppose that a call to fh.mount_enclosing_volume()
is needed, as this methods takes a MountOperation
as a parameter. The problem is that calling this methods does nothing, and the logical fh.enumerate_children()
(to list the available shares) that comes next fails.
Anybody could provide a working example of how this would be done with gio?
Thanks in advance.