21 lines
1 KiB
C
21 lines
1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* is_directory.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2017/03/25 01:40:31 by jhalford #+# #+# */
|
|
/* Updated: 2017/03/25 01:42:02 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
int is_directory(const char *path)
|
|
{
|
|
struct stat path_stat;
|
|
|
|
stat(path, &path_stat);
|
|
return (S_ISDIR(path_stat.st_mode));
|
|
}
|