Minor, refactor and fix function doc comment

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2018-07-22 14:46:08 +02:00
parent fe3673a5e1
commit 3989d91d36
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -25,17 +25,17 @@
#include <unistd.h>
/**
* fexist - Check if a file exists and is a directory.
* @file: File to look for, with full path.
* fisdir - Check if a path exists and is a directory.
* @path: Path to file or directory
*
* Returns:
* %TRUE(1) if the file exists and is a directory, otherwise %FALSE(0).
* %TRUE(1) if @path exists and is a directory, otherwise %FALSE(0).
*/
int fisdir(const char *file)
int fisdir(const char *path)
{
struct stat sb;
if (!stat(file, &sb) && S_ISDIR(sb.st_mode))
if (!stat(path, &sb) && S_ISDIR(sb.st_mode))
return 1;
return 0;
+1 -1
View File
@@ -57,7 +57,7 @@ char *chomp (char *str);
char *fparseln (FILE *, size_t *, size_t *, const char[3], int);
int fexist (const char *file);
int fisdir (const char *file);
int fisdir (const char *path);
FILE *tempfile (void);
ssize_t copyfile (const char *src, const char *dst, int len, int opt);