Copied and adjusted from systemd code.
dcc8de1 core: add utils for file handling
src/nm-core-utils.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/nm-core-utils.h | 6 +++
2 files changed, 124 insertions(+)
Upstream: cgit.freedesktop.org