MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
FlowWriter.cpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2025 Contributors to the Media eXchange Layer project.
2
// SPDX-License-Identifier: Apache-2.0
3
4
#include "
mxl-internal/FlowWriter.hpp
"
5
#include <utility>
6
7
namespace
mxl::lib
8
{
9
FlowWriter::FlowWriter
(uuids::uuid&&
flowId
, std::filesystem::path
const
& domain)
10
:
_flowId
{std::move(
flowId
)}
11
,
_domain
{domain}
12
{}
13
14
FlowWriter::FlowWriter
(uuids::uuid
const
&
flowId
, std::filesystem::path
const
& domain)
15
:
_flowId
{
flowId
}
16
,
_domain
{domain}
17
{}
18
19
FlowWriter::FlowWriter::~FlowWriter() =
default
;
20
21
uuids::uuid
const
&
FlowWriter::getId
()
const
22
{
23
return
_flowId
;
24
}
25
26
bool
FlowWriter::checkPermissions
()
const
27
{
28
// Verify that the domain exists, is a directory and that we can traverse and write into it.
29
return
std::filesystem::is_directory(
_domain
) && (::access(
_domain
.c_str(), X_OK | W_OK) == 0);
30
}
31
}
FlowWriter.hpp
mxl::lib::FlowWriter::_domain
std::filesystem::path _domain
Definition
FlowWriter.hpp:92
mxl::lib::FlowWriter::FlowWriter
FlowWriter(uuids::uuid &&flowId, std::filesystem::path const &domain)
Definition
FlowWriter.cpp:9
mxl::lib::FlowWriter::getId
uuids::uuid const & getId() const
Definition
FlowWriter.cpp:21
mxl::lib::FlowWriter::_flowId
uuids::uuid _flowId
Definition
FlowWriter.hpp:91
mxl::lib::FlowWriter::checkPermissions
bool checkPermissions() const
Definition
FlowWriter.cpp:26
mxl::lib
Definition
fabrics.cpp:33
flowId
auto const flowId
Definition
test_flows.cpp:139
lib
internal
src
FlowWriter.cpp
Generated by
1.15.0