libexplain  1.4.D001
Functions
libexplain/buffer/enotdir.c File Reference
#include <libexplain/ac/errno.h>
#include <libexplain/ac/stdio.h>
#include <libexplain/ac/sys/stat.h>
#include <libexplain/buffer/enotdir.h>
#include <libexplain/buffer/errno/path_resolution.h>
#include <libexplain/buffer/file_type.h>
#include <libexplain/buffer/wrong_file_type.h>

Go to the source code of this file.

Functions

void explain_buffer_enotdir (explain_string_buffer_t *sb, const char *pathname, const char *caption, const explain_final_t *final_component)
void explain_buffer_enotdir2 (explain_string_buffer_t *sb, const char *oldpath, const char *oldpath_caption, const explain_final_t *oldpath_final_component, const char *newpath, const char *newpath_caption, const explain_final_t *newpath_final_component)
void explain_buffer_enotdir_fd (explain_string_buffer_t *sb, int fildes, const char *caption)
int explain_fildes_is_a_directory (int fildes)

Function Documentation

void explain_buffer_enotdir ( explain_string_buffer_t sb,
const char *  pathname,
const char *  caption,
const explain_final_t final_component 
)

Definition at line 31 of file enotdir.c.

void explain_buffer_enotdir2 ( explain_string_buffer_t sb,
const char *  oldpath,
const char *  oldpath_caption,
const explain_final_t oldpath_final_component,
const char *  newpath,
const char *  newpath_caption,
const explain_final_t newpath_final_component 
)

Definition at line 71 of file enotdir.c.

void explain_buffer_enotdir_fd ( explain_string_buffer_t sb,
int  fildes,
const char *  fildes_caption 
)

The explain_buffer_enotdir_fd function may be used to

Parameters:
sbThe string buffer to print into
fildesThe offending file descriptor
fildes_captionThe name of the function argument of the offending file descriptor

Definition at line 139 of file enotdir.c.

int explain_fildes_is_a_directory ( int  fildes)

The explain_fildes_is_a_directory function is used to determine whether or not a file descriptor refers to a directory.

Parameters:
fildesThe file descriptor to be tested.
Returns:
true (nonzero0 if it is a dir; false (zero) is it is not a dir.

Definition at line 147 of file enotdir.c.