MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
FlowReader.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#include <unistd.h>
8
9namespace mxl::lib
10{
11 FlowReader::FlowReader(uuids::uuid&& flowId, std::filesystem::path const& domain)
12 : _flowId{std::move(flowId)}
13 , _domain{domain}
14 {}
15
16 FlowReader::FlowReader(uuids::uuid const& flowId, std::filesystem::path const& domain)
18 , _domain{domain}
19 {}
20
21 FlowReader::FlowReader::~FlowReader() = default;
22
23 uuids::uuid const& FlowReader::getId() const
24 {
25 return _flowId;
26 }
27
28 std::filesystem::path const& FlowReader::getDomain() const
29 {
30 return _domain;
31 }
32
34 {
35 auto const flowDefPath = makeFlowDescriptorFilePath(_domain, uuids::to_string(_flowId));
36 return std::filesystem::is_regular_file(flowDefPath) && (::access(flowDefPath.c_str(), R_OK) == 0);
37 }
38}
Paths and filenames utilities used by the MXL SDK.
bool checkPermissions() const
std::filesystem::path _domain
uuids::uuid const & getId() const
FlowReader(uuids::uuid &&flowId, std::filesystem::path const &domain)
std::filesystem::path const & getDomain() const
std::filesystem::path makeFlowDescriptorFilePath(std::filesystem::path const &flowDirectory)
Definition PathUtils.cpp:23
auto const flowId