FileSystemIndexer
v0.1.2-beta
File System Indexer - An API to index files from your system
Loading...
Searching...
No Matches
FSI_timeUtils.hpp
Go to the documentation of this file.
1
#ifndef INCLUDE_CORE_FSI_TIMEUTILS_HPP_
2
#define INCLUDE_CORE_FSI_TIMEUTILS_HPP_
3
4
#include <filesystem>
5
6
namespace
fs = std::filesystem;
7
8
#ifdef FSI_OS_WIN32
9
# define __FSI_LOCALTIME(_tt, _tm) localtime_r(_tm, _tt)
10
#else
11
# define __FSI_LOCALTIME(_tt, _tm) localtime_r(_tt, _tm)
12
#endif
// FSI_OS_WIN32
13
14
namespace
fsi::utils
15
{
16
typedef
struct
TimeUtils_DateTime
17
{
18
unsigned
int
hour
;
19
unsigned
int
min
;
20
unsigned
int
sec
;
21
unsigned
int
ms
;
22
23
unsigned
int
year
;
24
unsigned
int
month
;
25
unsigned
int
day
;
26
}
TimeUtils_DateTime
;
27
28
/**
29
* @brief Set std::filesystem clock data to an actual usable Date and Time format
30
* @param time Get `std::filesystem::file_time_type` that is to be converted to a usuable time format
31
* @return Date-Time object to be used
32
*/
33
TimeUtils_DateTime
fsClockDataToDT
(
const
fs::file_time_type &time);
34
}
35
36
#endif
// INCLUDE_CORE_FSI_TIMEUTILS_HPP_
37
fsi::utils
Definition
FSI_timeUtils.hpp:15
fsi::utils::TimeUtils_DateTime
struct fsi::utils::TimeUtils_DateTime TimeUtils_DateTime
fsi::utils::fsClockDataToDT
TimeUtils_DateTime fsClockDataToDT(const fs::file_time_type &time)
Set std::filesystem clock data to an actual usable Date and Time format.
Definition
FSI_timeUtils.cpp:8
fsi::utils::TimeUtils_DateTime
Definition
FSI_timeUtils.hpp:17
fsi::utils::TimeUtils_DateTime::min
unsigned int min
Definition
FSI_timeUtils.hpp:19
fsi::utils::TimeUtils_DateTime::day
unsigned int day
Definition
FSI_timeUtils.hpp:25
fsi::utils::TimeUtils_DateTime::month
unsigned int month
Definition
FSI_timeUtils.hpp:24
fsi::utils::TimeUtils_DateTime::sec
unsigned int sec
Definition
FSI_timeUtils.hpp:20
fsi::utils::TimeUtils_DateTime::ms
unsigned int ms
Definition
FSI_timeUtils.hpp:21
fsi::utils::TimeUtils_DateTime::hour
unsigned int hour
Definition
FSI_timeUtils.hpp:18
fsi::utils::TimeUtils_DateTime::year
unsigned int year
Definition
FSI_timeUtils.hpp:23
inc
fsi
core
FSI_timeUtils.hpp
Generated by
1.16.1