|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sflfile.h"
Bool
file_is_directory (
const char *filename)
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'.
{
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);
}
| | << | < | > | >> |
|