Files
MuditaOS/module-platform/CommonPlatform.cpp
Marek Niepieklo 22a02078cd [CP-162] Implement Logs directory
Added listing of log/crash dump files
Reorg'ed log/crash dump files locations
Added harness api/device_info
Updated test and tool scripts
2021-09-29 10:37:58 +02:00

24 lines
683 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());
}
}
} // namespace platform