ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
filestatus.mod.cpp
1//##################################################################################################
2// ALib C++ Framework
3//
4// Copyright 2013-2026 A-Worx GmbH, Germany
5// Published under 'Boost Software License' (a free software license, see LICENSE.txt)
6//##################################################################################################
7//========================================= Global Fragment ========================================
8module;
11#include <filesystem>
12#if ALIB_SYSTEM_FILE_STATUS_IMPL == ALIB_SYSTEM_FILE_POSIX_STATUS
13# include <unistd.h>
14# if defined(__linux__)
15# include <asm/unistd.h>
16# endif
17# include <dirent.h>
18# if defined(__linux__)
19# include <linux/stat.h>
20# include <linux/magic.h>
21# endif
22# include <sys/stat.h>
23# include <sys/vfs.h>
24# if !defined(__APPLE__)
25# include <sys/sysmacros.h>
26# else
27# include <sys/types.h>
28# include <sys/mount.h>
29# endif
30# include <pwd.h>
31# include <fcntl.h>
32# include <pwd.h>
33# include <grp.h>
34#else
35 namespace fs = std::filesystem;
36
37 // Note: MacOS is currently (as of 231210) missing C++20 library features in the area of std::clock
38 #if defined(__APPLE__) || defined(_LIBCPP_VERSION) || defined(__ANDROID_NDK__)
39 namespace
40 {
41 template <typename TP>
42 std::time_t to_time_t(TP tp)
43 {
44 auto sctp = std::chrono::time_point_cast<std::chrono::system_clock::duration>(tp - TP::clock::now()
45 + std::chrono::system_clock::now());
46 return std::chrono::system_clock::to_time_t(sctp);
47 }
48 }
49 #endif
50#endif
51
52#if !defined (_WIN32)
53# include <pwd.h>
54# include <grp.h>
55#endif
56
57//============================================= Imports ============================================
58module ALib.System;
60 import ALib.Strings;
61 import ALib.Boxing;
62# if ALIB_EXPRESSIONS
63 import ALib.Expressions;
64# endif
65//========================================== Implementation ========================================
67#include "filestatus.cpp"
#define ALIB_ALLOW_IMPLEMENTATION_INCLUSION
#define ALIB_POP_ALLOWANCE