Ubuntu.Content.ContentItem
Content that can be imported or exported from a ContentPeer More...
Import Statement: | import Ubuntu.Content 1.1 |
Properties
Methods
Detailed Description
A ContentItem is an item that can be imported or exported from a ContentPeer
See documentation for ContentHub
Property Documentation
text : string |
Content of the transfer
url : url |
URL of the content data
Method Documentation
bool move(dir, fileName) |
If the url is a local file, move the file to dir and rename to fileName
If the move is successful, the url property will be changed and onUrlChanged will be emitted.
Returns true if the file was moved successfully, false on error or if the url wasn't a local file.
bool move(dir) |
If the url is a local file, move the file to dir
If the move is successful, the url property will be changed and onUrlChanged will be emitted.
Returns true if the file was moved successfully, false on error or if the url wasn't a local file.
string toDataURI() |
Returns the ContentItem base64 encoded with the mimetype as a properly formated dataUri