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 - 2000, Roxen IS.      // 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 "socket";    - constant cvs_version= "$Id: filesystem.pike,v 1.100 2001/05/20 13:03:34 nilsson Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.101 2001/06/27 19:00:56 per Exp $";   constant thread_safe=1;      #include <module.h>   #include <roxen.h>   #include <stat.h>   #include <request_trace.h>         //<locale-token project="mod_filesystem">LOCALE</locale-token>   #define LOCALE(X,Y) _DEF_LOCALE("mod_filesystem",X,Y)
Roxen.git/server/modules/filesystems/filesystem.pike:199:   #define FILTER_INTERNAL_FILE(f, id) \    (!id->misc->internal_get && sizeof (filter (internal_files, glob, (f/"/")[-1])))      mixed stat_file( string f, RequestID id )   {    Stat fs;       FILESYSTEM_WERR("stat_file for \""+f+"\"" +    (id->misc->internal_get ? " (internal)" : ""));    -  if (FILTER_INTERNAL_FILE (f, id)) return 0; +  if (FILTER_INTERNAL_FILE (f, id)) +  return 0;       if(stat_cache && !id->pragma["no-cache"] &&    (fs=cache_lookup("stat_cache",path+f)))    return fs[0]; -  +     object privs;    if (access_as_user && ((int)id->misc->uid) && ((int)id->misc->gid))    // NB: Root-access is prevented.    privs=Privs("Statting file", (int)id->misc->uid, (int)id->misc->gid );       /* No security currently in this function */    fs = file_stat(decode_path(path + f));    privs = 0;    if(!stat_cache) return fs;    cache_set("stat_cache", path+f, ({fs}));    return fs;   }      string real_file( string f, RequestID id )   { -  if(local::stat_file( f, id )) +  if(stat_file( f, id ))    return path + f;   }      int dir_filter_function(string f, RequestID id)   {    if(f[0]=='.' && !dotfiles) return 0;    if(!tilde && Roxen.backup_extension(f)) return 0;    return 1;   }