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

 

file_locate

#include "sflfile.h"
FILE *
file_locate (
    const char *path,
    const char *name,
    const char *ext)

Synopsis

Combines the functions of file where() and file_open when you want to read a file. Searches for a file on a specified path, opens the file if found, and returns a FILE * for the open file. Returns NULL if the file was not found or could not be opened for reading.

Source Code - (sflfile.c)

{
    char
        *filename;

    ASSERT (name);
    filename = file where ('r', path, name, ext);
    if (filename)
        return (file open (filename, 'r'));
    else
        return (NULL);
}

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