<HTML>
<HEAD>
<TITLE>W3C Reference Library libwww LOCAL FILE</TITLE>
<!-- Changed by: Henrik Frystyk Nielsen, 23-Mar-1996 -->
<NEXTID N="z4">
</HEAD>
<BODY>
<H1>File Access</H1>
<PRE>
/*
** (c) COPYRIGHT MIT 1995.
** Please first read the full copyright statement in the file COPYRIGH.
*/
</PRE>
These are routines for local file access used by WWW browsers and
servers.<P>
This module is implemented by <A HREF="HTFile.c">HTFile.c</A>, and it
is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
Reference Library</A>.
<PRE>
#ifndef HTFILE_H
#define HTFILE_H
#include "HTEvent.h"
extern HTEventCallback HTLoadFile;
</PRE>
<H2>Directory Access</H2>
You can define the directory access for file URLs by using the
following function.
<PRE>
typedef enum _HTDirAccess {
HT_DIR_FORBID, /* Altogether forbidden */
HT_DIR_SELECTIVE, /* Only if "selfile" exists */
HT_DIR_OK /* Directory reading always OK */
} HTDirAccess;
#define DEFAULT_DIR_FILE ".www_browsable" /* If exists, can browse */
extern HTDirAccess HTFile_dirAccess (void);
extern BOOL HTFile_setDirAccess (HTDirAccess mode);
</PRE>
<H2>Readme Files</H2>
You can specify the module to look for a README file and to put into a
directory listing. These are the possibilities:
<PRE>
typedef enum _HTDirReadme {
HT_DIR_README_NONE,
HT_DIR_README_TOP,
HT_DIR_README_BOTTOM
} HTDirReadme;
#define DEFAULT_README "README"
extern HTDirReadme HTFile_dirReadme (void);
extern BOOL HTFile_setDirReadme (HTDirReadme mode);
</PRE>
<PRE>
#endif /* HTFILE_H */
</PRE>
<HR>
<ADDRESS>
@(#) $Id: HTFile.html,v 2.36 1996/05/16 19:02:59 frystyk Exp $
</ADDRESS>
</BODY>
</HTML>
Webmaster