mirror of
https://github.com/troglobit/libite.git
synced 2026-10-01 05:22:34 +07:00
Minor, refactor and fix function doc comment
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+5
-5
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user