mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
Initial import
This commit is contained in:
commit
2295a33590
884 changed files with 93939 additions and 0 deletions
37
php/src/Data/DataConst.php
Normal file
37
php/src/Data/DataConst.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace AIO\Data;
|
||||
|
||||
class DataConst {
|
||||
public static function GetDataDirectory() : string {
|
||||
if(is_dir('/mnt/docker-aio-config/data/')) {
|
||||
return '/mnt/docker-aio-config/data/';
|
||||
}
|
||||
|
||||
return realpath(__DIR__ . '/../../data/');
|
||||
}
|
||||
|
||||
public static function GetSessionDirectory() : string {
|
||||
if(is_dir('/mnt/docker-aio-config/session/')) {
|
||||
return '/mnt/docker-aio-config/session/';
|
||||
}
|
||||
|
||||
return realpath(__DIR__ . '/../../session/');
|
||||
}
|
||||
|
||||
public static function GetConfigFile() : string {
|
||||
return self::GetDataDirectory() . '/configuration.json';
|
||||
}
|
||||
|
||||
public static function GetBackupSecretFile() : string {
|
||||
return self::GetDataDirectory() . '/backupsecret';
|
||||
}
|
||||
|
||||
public static function GetBackupKeyFile() : string {
|
||||
return self::GetDataDirectory() . '/borg.config';
|
||||
}
|
||||
|
||||
public static function GetBackupArchivesList() : string {
|
||||
return self::GetDataDirectory() . '/backup_archives.list';
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue