refactoring

This commit is contained in:
2021-11-10 15:56:01 +01:00
parent adc6cf214a
commit 5190e2ab30
11 changed files with 72 additions and 52 deletions

View File

@ -8,6 +8,9 @@
#include <fstream>
#include <string>
namespace sls {
/**
* @param data array of data values
* @param nch number of channels
@ -22,6 +25,7 @@ int readDataFile(std::ifstream &infile, short int *data, int nch,
*/
int readDataFile(std::string fname, short int *data, int nch);
std::vector<char> readBinaryFile(const std::string &fname,
const std::string &errorPrefix);
@ -42,6 +46,8 @@ int writeDataFile(std::string fname, int nch, short int *data);
// mkdir -p path implemented by recursive calls
void mkdir_p(const std::string &path, std::string dir = "");
namespace sls {
int getFileSize(std::ifstream &ifs);
ssize_t getFileSize(FILE* fd, const std::string &prependErrorString);
std::string getFileNameFromFilePath(const std::string &fpath);
}