mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-31 03:52:01 +08:00
19 lines
632 B
PHP
19 lines
632 B
PHP
<?php
|
|
|
|
class DemoStorage extends \RainLoop\Providers\Storage\FileStorage
|
|
{
|
|
/**
|
|
* @param \RainLoop\Model\Account|string|null $mAccount
|
|
*/
|
|
protected function generateFileName($mAccount, int $iStorageType, string $sKey, bool $bMkDir = false, bool $bForDeleteAction = false) : string
|
|
{
|
|
if (\RainLoop\Providers\Storage\Enumerations\StorageType::NOBODY === $iStorageType) {
|
|
return parent::generateFileName($mAccount, $iStorageType, $sKey, $bMkDir, $bForDeleteAction);
|
|
}
|
|
|
|
return $this->sDataPath
|
|
.'/demo'
|
|
.'/'.static::fixName(\RainLoop\Utils::GetConnectionToken())
|
|
.'/'.($sKey ? static::fixName($sKey) : '');
|
|
}
|
|
}
|