Files
slsDetectorPackage/slsSupportLib/include/sls/file_utils.h
T
Erik Fröjdh d94c0d0e72
Build on RHEL9 docker image / build (push) Successful in 4m0s
Build on RHEL8 docker image / build (push) Successful in 4m54s
Build and Deploy on local RHEL9 / build (push) Successful in 2m7s
Build and Deploy on local RHEL8 / build (push) Successful in 5m4s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m18s
Run Simulator Tests on local RHEL8 / build (push) Successful in 21m52s
removed unused function readDataFile/writeDataFile (#1456)
* removed unused function readDataFile/writeDataFile

* release notes
2026-05-12 12:01:09 +02:00

37 lines
1.0 KiB
C++

// SPDX-License-Identifier: LGPL-3.0-or-other
// Copyright (C) 2021 Contributors to the SLS Detector Package
#pragma once
#include "sls/sls_detector_defs.h"
#include <cstdio>
#include <fstream>
#include <string>
#include <vector>
namespace sls {
std::vector<char> readBinaryFile(const std::string &fname,
const std::string &errorPrefix);
// mkdir -p path implemented by recursive calls
void mkdir_p(const std::string &path, std::string dir = "");
int getFileSize(std::ifstream &ifs);
ssize_t getFileSize(FILE *fd, const std::string &prependErrorString);
std::string getFileNameFromFilePath(const std::string &fpath);
std::vector<int> getChannelsFromStringList(const std::vector<std::string> list);
/** File can have # for comments.
* Channels can be separated by spaces, commas
* and ranges provided using ':', eg. 23:29
* */
std::vector<int> getChannelsFromFile(const std::string &fname);
std::string getAbsolutePathFromCurrentProcess(const std::string &fname);
} // namespace sls