mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-09-22 11:10:22 +00:00
Initial import
This commit is contained in:
@@ -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';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user