| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

file_is_directory

#include "sflfile.h"
Bool
file_is_directory (
    const char *filename)

Synopsis

Returns TRUE if the specified file is a directory. The filename may end in a slash (/ or \). Under MS-DOS/OS2/Windows, a directory name may consist solely of a disk-drive specifier. Under VMS the directory may optionally take the extension '.dir'.

Source Code - (sflfile.c)

{
    char
        *dir_name;
    Bool
        rc;

    ASSERT (filename);

    dir_name = mem_strdup (clean path (filename));
#if (defined (__VMS__))
    if (!file exists (dir_name))
        default extension (dir_name, dir_name, "dir");
#endif
    rc = (file_mode (dir_name) & S_IFDIR) != 0;
    mem_free (dir_name);
    return (rc);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation