From 961abd0aba6c8bc15cd6c5defe04b67bc19e49b7 Mon Sep 17 00:00:00 2001 From: Victor Moene Date: Tue, 24 Feb 2026 11:15:38 +0100 Subject: [PATCH] Moved IsDir from core to libntech Signed-off-by: Victor Moene --- libpromises/files_names.c | 25 ------------------------- libpromises/files_names.h | 1 - 2 files changed, 26 deletions(-) diff --git a/libpromises/files_names.c b/libpromises/files_names.c index e710249bef..8b7e6e6c16 100644 --- a/libpromises/files_names.c +++ b/libpromises/files_names.c @@ -124,31 +124,6 @@ bool IsNewerFileTree(const char *dir, time_t reftime) /*********************************************************************/ -bool IsDir(const char *path) -/* -Checks if the object pointed to by path exists and is a directory. -Returns true if so, false otherwise. -*/ -{ -#ifdef __MINGW32__ - return NovaWin_IsDir(path); -#else - struct stat sb; - - if (stat(path, &sb) != -1) - { - if (S_ISDIR(sb.st_mode)) - { - return true; - } - } - - return false; -#endif /* !__MINGW32__ */ -} - -/*********************************************************************/ - char *JoinSuffix(char *path, size_t path_size, const char *leaf) { int len = strlen(leaf); diff --git a/libpromises/files_names.h b/libpromises/files_names.h index 107c8b4997..ad6814e15a 100644 --- a/libpromises/files_names.h +++ b/libpromises/files_names.h @@ -38,7 +38,6 @@ FilePathType FilePathGetType(const char *file_path); bool IsNewerFileTree(const char *dir, time_t reftime); int CompareCSVName(const char *s1, const char *s2); -bool IsDir(const char *path); char *JoinSuffix(char *path, size_t path_size, const char *leaf); char *JoinPaths(char *path, size_t path_size, const char *leaf_path); bool IsAbsPath(const char *path);