[Owncloud] Saving Files from Impressionist App
Thomas Tanghus
thomas at tanghus.net
Wed Oct 17 13:48:30 UTC 2012
On Wednesday 17 October 2012 17:09 Raghu Nayyar wrote:
> Hey guys,
>
> Its been quite sometime I have been working on the Impressionist app. I
> recently pushed a previewer for the presentation I make through it and also
> a download button if the user wishes to download the presentation he/she
> has made.
>
> The later feature is not yet 100% complete though as I don't wish to create
> a separate folder within the app (currently I have created output folder)
> and save the zip files there but I want to save them in
> data/<username>/impressionist folder, the same way as it is done in case of
> other applications like contacts, gallery, files etc.
>
> This will even make it easier to display the files I created in my
> application (analogous to how it displays in files/impress app).
>
> Please help me how to go about this, as I think this is the only feature
> left to be included in this application at the moment. ;)
There's a convenience method to get an OC_FilesystemView for the current user
under a folder named by the app id:
$view = OC_App::getStorage('impressionist');
Then you can use the methods which are named by existing PHP function calls
for example:
$view->file_put_contents('/myfile.txt','some text');
You can find all available methods in the core repository in
lib/filesystemview.php
--
Med venlig hilsen / Best Regards
Thomas Tanghus
More information about the Owncloud
mailing list