forked from audetto/CCTV
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.h
More file actions
28 lines (20 loc) · 702 Bytes
/
Copy pathutils.h
File metadata and controls
28 lines (20 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include <string>
#include <ctime>
namespace ASI
{
inline char * cast(const char * c)
{
return const_cast<char*>(c);
}
inline char * cast(const std::string & s)
{
return cast(s.c_str());
}
// Format: "%Y-%m-%d %H:%M:%S"
std::tm parseDateTime(const std::string & s);
std::string getEnvVar(const std::string & var);
std::string getFilename(const std::string & folder, const std::string & ext, const size_t channel, const std::tm & date);
std::string getLiveFilename(const std::string & folder, const std::string & ext, const size_t channel);
std::string getPictureFilename(const std::string & folder, const std::string & ext, const size_t channel);
}