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

version» Context lines:

Roxen.git/server/modules/filesystems/filesystem.pike:1:   // This is a roxen module. (c) Informationsv√§varna AB 1996.      // 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. - string cvs_version = "$Id: filesystem.pike,v 1.9 1997/01/29 18:54:19 kg Exp $"; + string cvs_version = "$Id: filesystem.pike,v 1.10 1997/02/14 03:42:57 per Exp $";   #include <module.h>   #include <stat.h>      #if DEBUG_LEVEL > 20   # ifndef FILESYSTEM_DEBUG   # define FILESYSTEM_DEBUG   # endif   #endif      inherit "module";   inherit "roxenlib";   inherit "socket";    -  + import Array; +    int redirects, accesses, errors, dirlists;   int puts, deletes;      static int do_stat = 1;      string status()   {    return ("<h2>Accesses to this filesystem</h2>"+    (redirects?"<b>Redirects</b>: "+redirects+"<br>":"")+    (accesses?"<b>Normal files</b>: "+accesses+"<br>"
Roxen.git/server/modules/filesystems/filesystem.pike:163:    errors++;    return 0;    }       dirlists++;       // Pass _all_ files, hide none.    if(QUERY(tilde) && QUERY(.files)) /* This is quite a lot faster */    return dir;    -  return filter_array(dir, dir_filter_function); +  return filter(dir, dir_filter_function);   }         mapping putting = ([]);      void done_with_put( array(object) id )   {   // perror("Done with put.\n");    id[0]->close();    id[1]->write("HTTP/1.0 200 Created\r\nContent-Length: 0\r\n\r\n");
Roxen.git/server/modules/filesystems/filesystem.pike:206:    }    if(fs = file_stat(X))    {    id->misc->stat = fs;    cache_set("stat_cache",(X),fs);    return fs[ST_SIZE];    }    return -1;   }    - #define FILE_SIZE(X) (stat_cache?_file_size((X),id):file_size(X)) + #define FILE_SIZE(X) (stat_cache?_file_size((X),id):Stdio.file_size(X))      mixed find_file( string f, object id )   {    object o;    int size;    string tmp;   #ifdef FILESYSTEM_DEBUG    perror("FILESYSTEM: Request for "+f+"\n");   #endif    size = FILE_SIZE( f = path + f );