Roxen.git / server / modules / filesystems / filesystem.pike

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1:   // This is a roxen module. Copyright © 1996 - 1999, Idonex AB.      // This is a virtual "file-system".   // It will be located somewhere in the name-space of the server.   // Also inherited by some of the other filesystems.      inherit "module";   inherit "roxenlib";   inherit "socket";    - constant cvs_version= "$Id: filesystem.pike,v 1.62 2000/01/06 22:34:11 mast Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.63 2000/01/31 03:48:21 per Exp $";   constant thread_safe=1;      #include <module.h>   #include <roxen.h>   #include <stat.h>   #include <request_trace.h>      #if DEBUG_LEVEL > 20   # ifndef FILESYSTEM_DEBUG   # define FILESYSTEM_DEBUG
Roxen.git/server/modules/filesystems/filesystem.pike:70:    "<b>Moved files</b>: "+moves+"<br>":"")+    (QUERY(put)&&chmods?"<b>CHMODs</b>: "+chmods+"<br>":"")+    (QUERY(delete)&&deletes?"<b>Deletes</b>: "+deletes+"<br>":"")+    (errors?"<b>Permission denied</b>: "+errors    +" (not counting .htaccess)<br>":"")+    (dirlists?"<b>Directories</b>:"+dirlists+"<br>":"");   }      void create()   { -  defvar("mountpoint", "/", "Mount point", TYPE_LOCATION, +  defvar("mountpoint", "/", "Mount point", TYPE_LOCATION|VAR_INITIAL,    "This is where the module will be inserted in the "+    "namespace of your server.");    -  defvar("searchpath", "NONE", "Search path", TYPE_DIR, +  defvar("searchpath", "NONE", "Search path", TYPE_DIR|VAR_INITIAL,    "This is where the module will find the files in the real "+    "file system");    - #ifdef COMPAT -  defvar("html", 0, "All files are really HTML files", TYPE_FLAG|VAR_EXPERT, -  "If you set this variable, the filesystem will _know_ that all files " -  "are really HTML files. This might be useful now and then."); - #endif -  +     defvar(".files", 0, "Show hidden files", TYPE_FLAG|VAR_MORE,    "If set, hidden files will be shown in dirlistings and you "    "will be able to retrieve them.");       defvar("dir", 1, "Enable directory listings per default", TYPE_FLAG|VAR_MORE,    "If set, you have to create a file named .www_not_browsable ("    "or .nodiraccess) in a directory to disable directory listings."    " If unset, a file named .www_browsable in a directory will "    "_enable_ directory listings.\n");       defvar("tilde", 0, "Show backup files", TYPE_FLAG|VAR_MORE,    "If set, files ending with '~' or '#' or '.bak' will "+    "be shown in directory listings");    -  defvar("put", 0, "Handle the PUT method", TYPE_FLAG, +  defvar("put", 0, "Handle the PUT method", TYPE_FLAG|VAR_INITIAL,    "If set, PUT can be used to upload files to the server.");    -  defvar("delete", 0, "Handle the DELETE method", TYPE_FLAG, +  defvar("delete", 0, "Handle the DELETE method", TYPE_FLAG|VAR_INITIAL,    "If set, DELETE can be used to delete files from the "    "server.");       defvar("check_auth", 1, "Require authentication for modification",    TYPE_FLAG,    "Only allow authenticated users to use methods other than "    "GET and POST. If unset, this filesystem will be a _very_ "    "public one (anyone can edit files located on it)");       defvar("stat_cache", 0, "Cache the results of stat(2)",
Roxen.git/server/modules/filesystems/filesystem.pike:474:       TRACE_LEAVE("");    TRACE_LEAVE("Permission denied.");    return http_low_answer(403, "<h2>File exists, but access forbidden "    "by user</h2>");    }       id->realfile = f;    TRACE_LEAVE("");    accesses++; - #ifdef COMPAT -  if(QUERY(html)) {/* Not very likely, really.. */ -  TRACE_LEAVE("Compat return"); -  return ([ "type":"text/html", "file":o, ]); -  } - #endif +     TRACE_LEAVE("Normal return");    return o;    }    break;       case "MKDIR":    if(!QUERY(put))    {    id->misc->error_code = 405;    TRACE_LEAVE("MKDIR disallowed (since PUT is disallowed)");