Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 ?

share|improve this question
    
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
add comment

1 Answer

up vote 1 down vote accepted

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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