[Owncloud] Integration with Plasma Active

Robin Appelman icewind at owncloud.com
Sat Mar 10 21:00:19 UTC 2012


On Saturday 10 March 2012 14:47:14 Klaas Freitag wrote:
> On 09.03.2012 19:18, Jakob Sack wrote:
> Hi,
> 
> > it is great to see an ownCloud integration in Plasma Active.
> > Concerning your question: instead of just including "lib/base.php" use
> > the following snippet:
> > 
> > $RUNTIME_NOSETUPFS=true;
> > require_once('lib/base.php');
> > OC_Util::SetupFS( "", "kconfig" );
> > 
> > This basically mounts the folder "$ownclouddata/$username/kconfig"
> > instead of "$ownclouddata/$username/files". There you can mess around
> > with files that are invisible to the user.
> 
> This helps me a lot with the syncing clients as there have to be
> temporarily uploaded files for time syncronisation for example which
> should not be visible to the user. I'll experiment a bit :)
> 

If you need to access files outside the users home folder while still keeping 
the "regular" filesystem, you can use filesystem views (not available in 3.0 
only in git atm) with the following code:

$view=new OC_FileSystemView("$username/kconfig");

and then use it like this:
$view->file_put_contents('foo'.txt,'bar');

filesystem views and the static oc_filesystem provide the same api

 - Robin Appelman



More information about the Owncloud mailing list