On Monday 16 September 2013 15:59 Thomas Müller wrote: > 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.
Excellent. > > 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() So now in order to get the Files view you will have to do something like: $root = $server->getRootFolder(); $files = $root->get('/files'); If so adding a getUserFolder() is a good idea. Maybe getRootFolder() should return the view to /files, otherwise an app has access to other apps storage area. Then get app storage via getStorage() Maybe we should discuss this on the What's missing issue? -- Med venlig hilsen / Best Regards Thomas Tanghus _______________________________________________ Owncloud mailing list Owncloud@kde.org https://mail.kde.org/mailman/listinfo/owncloud