Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion developer_manual/digging_deeper/user_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ whenever a user export or import begins.
use OCP\UserMigration\IExportDestination;
use OCP\UserMigration\IImportSource;
use OCP\UserMigration\IMigrator;
use OCP\UserMigration\ISizeEstimationMigrator;
use OCP\UserMigration\TMigratorBasicVersionHandling;
use OCP\UserMigration\UserMigrationException;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;

class MyAppMigrator implements IMigrator {
class MyAppMigrator implements IMigrator, ISizeEstimationMigrator {
use TMigratorBasicVersionHandling;

private IMyAppManager $myAppManager;
Expand All @@ -54,6 +55,17 @@ whenever a user export or import begins.
$this->l10n = $l10n;
}

/**
* Returns an estimate of the exported data size in KiB.
* Should be fast, favor performance over accuracy.
*
* @since 25.0.0
*/
public function getEstimatedExportSize(IUser $user): int {
$size = 100; // 100KiB for user data JSON
return $size;
}

/**
* Export user data
*
Expand Down