From 4504dd3599404a916f104e0c715a9bcf3fb0062b Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 6 Sep 2017 22:42:26 -0400 Subject: util: Factor out checks for nonexistent paths/broken links --- util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util.h') diff --git a/util.h b/util.h index e23acdc..57123e0 100644 --- a/util.h +++ b/util.h @@ -142,6 +142,11 @@ void format_mode(mode_t mode, char str[11]); */ const char *xbasename(const char *path); +/** + * Return whether an error code is due to a path not existing. + */ +bool is_nonexistence_error(int error); + /** * stat() a file, falling back on the link itself for broken symbolic links. * -- cgit v1.2.3