Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
26e242a8
Commit
26e242a8
authored
10 years ago
by
Vincent Petry
Browse files
Options
Downloads
Patches
Plain Diff
Added PHP docs for etag propagator
parent
bcf65412
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/files_external/lib/etagpropagator.php
+17
-4
17 additions, 4 deletions
apps/files_external/lib/etagpropagator.php
with
17 additions
and
4 deletions
apps/files_external/lib/etagpropagator.php
+
17
−
4
View file @
26e242a8
...
...
@@ -10,6 +10,16 @@ namespace OCA\Files_External;
use
OC\Files\Filesystem
;
/**
* Updates the etag of parent folders whenever a new external storage mount
* point has been created or deleted. Updates need to be triggered using
* the updateHook() method.
*
* There are two modes of operation:
* - for personal mount points, the etag is propagated directly
* - for system mount points, a dirty flag is saved in the configuration and
* the etag will be updated the next time propagateDirtyMountPoints() is called
*/
class
EtagPropagator
{
/**
* @var \OCP\IUser
...
...
@@ -27,8 +37,10 @@ class EtagPropagator {
protected
$config
;
/**
* @param \OCP\IUser $user
* @param \OC\Files\Cache\ChangePropagator $changePropagator
* @param \OCP\IUser $user current user, must match the propagator's
* user
* @param \OC\Files\Cache\ChangePropagator $changePropagator change propagator
* initialized with a view for $user
* @param \OCP\IConfig $config
*/
public
function
__construct
(
$user
,
$changePropagator
,
$config
)
{
...
...
@@ -91,9 +103,10 @@ class EtagPropagator {
* Update etags for mount points for known user
* For global or group mount points, updating the etag for every user is not feasible
* instead we mark the mount point as dirty and update the etag when the filesystem is loaded for the user
* For personal mount points, the change is propagated directly
*
* @param array $params
* @param int $time
* @param array $params
hook parameters
* @param int $time
update time to use when marking a mount point as dirty
*/
public
function
updateHook
(
$params
,
$time
=
null
)
{
if
(
$time
===
null
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment