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.71 2000/03/07 23:58:06 mast Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.72 2000/03/08 01:36:19 mast 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:133:       defvar("no_symlinks", 0, "Forbid access to symlinks", TYPE_FLAG|VAR_MORE,    "Forbid access to paths containing symbolic links.<br>\n"    "NOTE: This can cause *alot* of lstat system-calls to be performed "    "and can make the server much slower.");       defvar("charset", "iso-8859-1", "File charset", TYPE_STRING,    "The charset the files on disk have.");       defvar("internal_files", ({}), "Internal files", TYPE_STRING_LIST, -  "A comma separated list of glob patterns that matches files " -  "which should be considered internal. Internal files can't be " -  "requested directly from a client, won't show up in directory " -  "listings and can never be uploaded, moved or deleted from a " -  "client. They can only be accessed internally, e.g. with the " -  "RXML <tt>&lt;insert&gt;</tt> and <tt>&lt;use&gt;</tt> tags."); +  "A list of glob patterns that matches files which should be " +  "considered internal. Internal files can't be requested directly " +  "from a client, won't show up in directory listings and can " +  "never be uploaded, moved or deleted from a client. They can " +  "only be accessed internally, e.g. with the RXML " +  "<tt>&lt;insert&gt;</tt> and <tt>&lt;use&gt;</tt> tags.");   }         string path;   int stat_cache;      void start()   {    path = QUERY(searchpath);    stat_cache = QUERY(stat_cache);
Roxen.git/server/modules/filesystems/filesystem.pike:201:    if(this->stat_file( f, id ))   /* This filesystem might be inherited by other filesystem, therefore    'this' */    return path + f;   }      int dir_filter_function(string f, RequestID id)   {    if(f[0]=='.' && !QUERY(.files)) return 0;    if(!QUERY(tilde) && backup_extension(f)) return 0; -  if (FILTER_INTERNAL_FILE (f, id)) return 0; +     return 1;   }      array find_dir( string f, RequestID id )   {    mixed ret;    array dir;       FILESYSTEM_WERR("find_dir for \""+f+"\"");   
Roxen.git/server/modules/filesystems/filesystem.pike:249:    }       dirlists++;       // Pass _all_ files, hide none.    if(QUERY(tilde) && QUERY(.files) &&    (!sizeof (QUERY (internal_files)) || id->misc->internal_get))    /* This is quite a lot faster */    return dir;    -  return Array.filter(dir, dir_filter_function, id); +  dir = Array.filter(dir, dir_filter_function, id); +  +  if (!id->misc->internal_get) +  foreach (QUERY (internal_files), string globstr) +  dir -= glob (globstr, dir); +  +  return dir;   }         mapping putting = ([]);      void done_with_put( array(object|string) id_arr )   {   // werror("Done with put.\n");    object to;    object from;