/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* is_directory.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/25 01:40:31 by jhalford #+# #+# */ /* Updated: 2017/03/27 16:58:21 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" int is_directory(const char *path) { struct stat path_stat; if (stat(path, &path_stat) != 0) return (0); return (S_ISDIR(path_stat.st_mode)); }