Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions libpromises/files_names.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion libpromises/files_names.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading