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

 

file_is_readable

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

Synopsis

Returns TRUE if the current process can read the specified file or directory. The filename may end in a slash (/ or \) only if it is a directory.

Source Code - (sflfile.c)

{
    ASSERT (filename);
    if (file is directory (filename))
        return ((file_mode (clean path (filename)) & S_IREAD) != 0);
    else
    if (strlast (filename) == '/')
        return (FALSE);
    else
        return ((file_mode (filename) & S_IREAD) != 0);
}

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