ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #11249
Content Hub Questions
Hi all,
I've been trying, and largely failing, to understand the content hub.
But I've managed to crystallize my ignorance into questions, so maybe
y'all can help me out.
I'm starting with a content importer, and I've gotten to the point
where I can receive the ContentItem from another app. The item comes
with a file URL pointing to
~/.cache/<appid>/HubIncoming/<#>/<filename>, which I can open. So:
1) Is that file permanent, or will the cache be cleaned occasionally?
2) This file is a hardlink to the original file. Does that mean both
apps can modify the file, or do apparmor rules restrict that? Is there
any mechanism to delete this hardlink when the original is deleted?
3) The content item has a move() method, but whenever I try it, I get a
console message, "Failed to move content to: <path> falling back to
copy". Why is this happening?
4) Is the argument to move() relative to some directory, or must I use
an absolute path? Is there any abbreviation for $HOME? (~ doesn't seem
to work.)
5) The copy I get as a result of move() isn't a hardlink. Is it
supposed to be?
6) Is there anyway to tell that two imports are actually the same
original file? Short of running md5sum on them, I mean. The filename
in HubIncoming seems to be the same as the original file. Is that
guaranteed?
Thanks,
Robert
Follow ups