https://github.com/owncloud/core/blob/master/remote.php#L37