3

If Nautilus is used to drop a file on a samba share into an app, then the app will see: "SMB://server/share/file"

How is the app supposed to detect real, working gvfs path of that file ? different Ubuntu versions have different paths to the gvfs folder.

is there an API, or conversion script, or anything like that, that could translate that into the ull GVFS path ?

  • What do you mean "full GVFS path" exactly? The smb://host/share/file URL is the path that apps using GVFS for file I/O would use to access the file. – dobey Nov 6 '12 at 14:21
2

Use GIO GVfs, for example in Python:

#!/usr/bin/env python
from gi.repository import Gio

uri='SMB://server/share/file'

gvfs=Gio.Vfs.get_default()
path=gvfs.get_file_for_uri(uri).get_path()
print path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.