Skip to content

Commit

Permalink
chore: documentation
Browse files Browse the repository at this point in the history
Signed-off-by: gbrousse-recia <[email protected]>
  • Loading branch information
gbrousse-recia committed Jun 22, 2023
1 parent 790dcdc commit b82c65b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/Mount/GroupFolderPropagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class GroupFolderPropagator extends Propagator {

/**
* @param \OCA\GroupFolders\Mount\GroupFolderStorage $storage
* @param \OCP\IDBConnection $connection
* @param \OCP\ILogger $logger
*/
public function __construct(\OC\Files\Storage\Storage $storage, IDBConnection $connection, ILogger $logger) {
parent::__construct($storage, $connection);
Expand All @@ -54,6 +56,12 @@ public function __construct(\OC\Files\Storage\Storage $storage, IDBConnection $c
$this->logger = $logger;
}

/**
* get paths of parent directories
*
* @param string $pathOrigin
* @return array
*/
protected function getParents($pathOrigin) {
$groupFolderPath = $this->getGroupFolderMountPoint($this->folderId);
if(!strstr($pathOrigin,$groupFolderPath)){
Expand All @@ -75,6 +83,11 @@ protected function getParents($pathOrigin) {
return $fullParents;
}

/**
* get all parent groupfolders of the current groupfolder
*
* @return array
*/
protected function getGroupFolderParents(){
// Get folder mountpoint
$query = $this->connection->getQueryBuilder();
Expand All @@ -101,6 +114,12 @@ protected function getGroupFolderParents(){
,$parentsIds);
}

/**
* get the groupfolder mount point
*
* @param int $groupFolderId
* @return string
*/
protected function getGroupFolderMountPoint($groupFolderId){
return '__groupfolders/'.$groupFolderId;
}
Expand Down
1 change: 1 addition & 0 deletions lib/Mount/GroupFolderStorage.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/**
* @copyright Copyright (c) 2018 Robin Appelman <[email protected]>
* @copyright Copyright (c) 2023, Grégory Brousse <[email protected]>
*
* @license GNU AGPL version 3 or any later version
*
Expand Down

0 comments on commit b82c65b

Please sign in to comment.