Skip to content

iceoryx_hoofs/cxx/filesystem.hpp🔗

Namespaces🔗

Name
iox
building block to easily create free function for logging in a library context
iox::cxx

Source code🔗

// Copyright (c) 2022 by Apex.AI Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
#ifndef IOX_HOOFS_CXX_FILESYSTEM_HPP
#define IOX_HOOFS_CXX_FILESYSTEM_HPP

#include <cstdint>

namespace iox
{
namespace cxx
{
enum class perms : uint64_t
{
    none = 0,

    owner_read = 0400,
    owner_write = 0200,
    owner_exec = 0100,
    owner_all = 0700,

    group_read = 040,
    group_write = 020,
    group_exec = 010,
    group_all = 070,

    others_read = 04,
    others_write = 02,
    others_exec = 01,
    others_all = 07,

    all = 0777,

    set_uid = 04000,
    set_gid = 02000,
    sticky_bit = 01000,

    mask = 07777,

    unknown = 0xFFFF
};

perms operator|(const perms& lhs, const perms& rhs) noexcept;

perms operator&(const perms& lhs, const perms& rhs) noexcept;

perms operator^(const perms& lhs, const perms& rhs) noexcept;

perms operator~(const perms& value) noexcept;

perms operator|=(perms& lhs, const perms& rhs) noexcept;

perms operator&=(perms& lhs, const perms& rhs) noexcept;

perms operator^=(perms& lhs, const perms& rhs) noexcept;

template <typename StreamType>
StreamType& operator<<(StreamType& stream, perms value) noexcept;
} // namespace cxx
} // namespace iox

#endif

Updated on 18 December 2023 at 13:11:42 CET