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.86 2000/08/23 18:53:09 per Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.87 2000/08/28 05:31:54 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:188:   {    return mountpoint;   }         #define FILTER_INTERNAL_FILE(f, id) \    (!id->misc->internal_get && sizeof (filter (internal_files, glob, (f/"/")[-1])))      mixed stat_file( string f, RequestID id )   { -  array fs; +  Stat fs;       FILESYSTEM_WERR("stat_file for \""+f+"\"" +    (id->misc->internal_get ? " (internal)" : ""));       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];   
Roxen.git/server/modules/filesystems/filesystem.pike:379:   #else    while( strlen(p) && p[-1] == '/' )    p = p[..strlen(p)-2];   #endif    return p;   }         int _file_size(string X,object id)   { -  array fs; +  Stat fs;    if( stat_cache )    {    if(!id->pragma["no-cache"]&&(fs=cache_lookup("stat_cache",(X))))    {    id->misc->stat = fs[0];    return fs[0]?fs[0][ST_SIZE]:-1;    }    }    if(fs = file_stat(decode_path(X)))    {
Roxen.git/server/modules/filesystems/filesystem.pike:401:    if( stat_cache ) cache_set("stat_cache",(X),({fs}));    return fs[ST_SIZE];    } else if( stat_cache )    cache_set("stat_cache",(X),({0}));    return -1;   }      int contains_symlinks(string root, string path)   {    array arr = path/"/"; +  Stat rr;       foreach(arr - ({ "" }), path) {    root += "/" + path; -  if (arr = file_stat(decode_path(root), 1)) { -  if (arr[1] == -3) { +  if (rr = file_stat(decode_path(root), 1)) { +  if (rr[1] == -3) {    return(1);    }    } else {    return(0);    }    }    return(0);   }      mixed find_file( string f, RequestID id )