// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved. // For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md #include #include #include #include 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