added SnapshotManager, added simple function to list snapshots
This commit is contained in:
parent
dd565a988e
commit
4c67bf71c4
3 changed files with 18 additions and 2 deletions
16
lib/Manager/SnapshotManager.php
Normal file
16
lib/Manager/SnapshotManager.php
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace OCA\GroupfolderFilesystemSnapshots\Manager;
|
||||
|
||||
class SnapshotManager {
|
||||
function get() {
|
||||
$filesystem_path = "/srv/nextcloud/files/";
|
||||
$filesystem_snapshot_path = "/srv/nextcloud/files/.zfs/snapshot/";
|
||||
|
||||
$iterator = new \FilesystemIterator($filesystem_snapshot_path);
|
||||
foreach ($iterator as $fileinfo) {
|
||||
if(!$fileinfo->isDir()) continue;
|
||||
yield $fileinfo->getFilename();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue