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
5#include <utility>
6
7namespace 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)
16 , _domain{domain}
17 {}
18
19 FlowWriter::FlowWriter::~FlowWriter() = default;
20
21 uuids::uuid const& FlowWriter::getId() const
22 {
23 return _flowId;
24 }
25
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}
std::filesystem::path _domain
FlowWriter(uuids::uuid &&flowId, std::filesystem::path const &domain)
Definition FlowWriter.cpp:9
uuids::uuid const & getId() const
bool checkPermissions() const
auto const flowId