[Owncloud] Missing methods in public namespace

Thomas Müller thomas.mueller at tmit.eu
Mon Sep 16 13:59:56 UTC 2013




Am Montag, dem 16.09.2013 um 15:47 schrieb Thomas Tanghus:
> On Monday 16 September 2013 14:54 Thomas Müller wrote:
> > Am Montag, dem 16.09.2013 um 14:33 schrieb Bernhard Posselt:
> > > On 09/16/2013 02:18 AM, Thomas Tanghus wrote:
> > > > OC_Filesystem: - file_get_contents/file_put_contents -> OCP\Files
> > > 
> > > Can be done by using the View class
> > 
> > No - the view class is not in the public namespace.
> > Use http://api.owncloud.org/classes/OCP.Files.File.html#getContent
> 
> I may be a little dense, but how do I obtain a File object?
>

First you get the root folder from the server container and call get($path) on it
http://api.owncloud.org/classes/OCP.Files.Folder.html#get

This will give you a file, a folder or throw an exception.

Currently the getRootFolder() method will return the ownCloud root folder which might not be that comfortable.
We will add more operations soon - e.g. getUserFolder()
 
> -- 
> Med venlig hilsen / Best Regards
> 
> Thomas Tanghus
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud



More information about the Owncloud mailing list