/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #pragma once namespace Core { class UmaskScope { public: explicit UmaskScope(mode_t mask) { m_old_mask = umask(mask); } ~UmaskScope() { umask(m_old_mask); } private: mode_t m_old_mask {}; }; }