|   | ![[ Previous ]](navbprev.gif)  ![[ Contents ]](navbhome.gif)  ![[ Index ]](navbhelp.gif)  ![[ Next ]](navbnext.gif)  | 
    int Ns_UrlIsFile(
    char *hServer,
    char *URL
    );
The Ns_UrlIsFile function constructs a file name by appending the URL to the current AOLserver pages directory for the specified server. It returns 1 if the file exists and is a regular file.
    /* IsFile - Simple request to determine if an URL is a file. */
    int
    IsFile(Ns_Conn *conn, void *ctx)
    {
    	int isfile;
    	char *server;
    
    	server = Ns_ConnServer(conn);
    	isfile = Ns_UrlIsFile(server, conn->request->url);
    	if (isfile) {
    		Ns_ConnReturnNotice(conn, 200, "File", NULL);
    	} else {
    		Ns_ConnReturnNotice(conn, 200, "Not a File", NULL);
    	}
    	return NS_OK;
    }