mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-19 14:40:57 -04:00
[CP-648] Handle updated API requests Updated B&R to handle new API Extended error reporting Backup/Restore code clean up [CP-649] Check OS version compatibility during restore Added check of OS and backup versions Fixed adding of version.json to PurePhone.img
32 lines
1013 B
C++
32 lines
1013 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include <Platform.hpp>
|
|
|
|
#include <purefs/vfs_subsystem.hpp>
|
|
#include <purefs/filesystem_paths.hpp>
|
|
#include <filesystem>
|
|
|
|
namespace platform
|
|
{
|
|
|
|
void Platform::initCommonUserFolders()
|
|
{
|
|
if (!std::filesystem::exists(purefs::dir::getLogsPath())) {
|
|
std::filesystem::create_directories(purefs::dir::getLogsPath());
|
|
}
|
|
|
|
if (!std::filesystem::exists(purefs::dir::getCrashDumpsPath())) {
|
|
std::filesystem::create_directories(purefs::dir::getCrashDumpsPath());
|
|
}
|
|
|
|
if (!std::filesystem::exists(purefs::dir::getBackupOSPath())) {
|
|
std::filesystem::create_directories(purefs::dir::getBackupOSPath());
|
|
}
|
|
|
|
if (!std::filesystem::exists(purefs::dir::getTemporaryPath())) {
|
|
std::filesystem::create_directories(purefs::dir::getTemporaryPath());
|
|
}
|
|
}
|
|
} // namespace platform
|