]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tools: add a few functions to simply check for a file's existence
authorWilly Tarreau <w@1wt.eu>
Mon, 6 Jan 2025 18:34:41 +0000 (19:34 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 9 Jan 2025 08:18:49 +0000 (09:18 +0100)
commitb25850f25b4d1a0bb4a1a8709dc019e5fab21b96
treed9a9b74caa94601e223208ef9c3e2c8c42ada174
parentb9cc361b35e66c1f2d26a9b703f8759f70cbc03c
MINOR: tools: add a few functions to simply check for a file's existence

At many places we'd like to be able to simply construct a path from a
format string and check if that path corresponds to an existing file,
directory etc. Here we add 3 functions, a generic one to test that a
path corresponds to a given file mode (e.g. S_IFDIR, S_IFREG etc), and
two other ones specifically checking for a file or a dir for easier
use.
include/haproxy/tools.h
src/tools.c