:::: MENU ::::

Make your ownCloud app compatible with the new filecache

Robin Appelman has recently rewritten ownCloud’s filecache components, and made a variety of improvements to the filesystem handling classes. Some of the changes break compatibility with existing apps however, especially if they use the filecache directly.

I have just finished making the encryption app compatible, and here are the instructions I followed (originally posted by Robin to owncloud@kde.org):

OC_Filesystem and OC_FilesystemView have been renamed to OCFilesFilesystem and OCFilesView. For backwards compatibility they are still available under their old name for now but that will probably change in the future.

The filesystem cache is accessible with the following functions:

  • OCFilesFilesystem::getFileInfo($path)
  • OCFilesFilesystem::putFileInfo($path)
  • OCFilesFilesystem::getDirectoryContent($path)
  • OCFilesFilesystem::search($query)
  • OCFilesFilesystem::searchByMime($mimetype) (accepts both ‘text/plain’ and wildcard ‘text’ style mimetypes)

If you need to access the cache for files outside the user’s home directory, the same functions are available in OCFilesView.


So, what do you think ?