Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Dec 14, 2023
1 parent d7c3b15 commit 971120d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/libhictk/hic/include/hictk/hic/impl/validation_impl.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (C) 2023 Roberto Rossini <roberros@uio.no>
//
// SPDX-License-Identifier: MIT

#pragma once

#include <algorithm>
#include <cstdint>
#include <filesystem>
#include <vector>

#include "hictk/hic/file_reader.hpp"

namespace hictk::hic::utils {
inline bool is_hic_file(const std::filesystem::path& path) {
return internal::HiCFileReader::checkMagicString(path.string());
}

} // namespace hictk::hic::utils
13 changes: 13 additions & 0 deletions src/libhictk/hic/include/hictk/hic/validation.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (C) 2023 Roberto Rossini <roberros@uio.no>
//
// SPDX-License-Identifier: MIT

#pragma once

#include <filesystem>

namespace hictk::hic::utils {
[[nodiscard]] bool is_hic_file(const std::filesystem::path &path);
} // namespace hictk::hic::utils

#include "./impl/validation_impl.hpp" // NOLINT

0 comments on commit 971120d

Please sign in to comment.