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 - 2001, 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.144 2004/05/14 16:54:22 anders Exp $"; + constant cvs_version= "$Id: filesystem.pike,v 1.145 2004/05/14 21:21:22 mast 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:403:    TRACE_LEAVE("PUT: Permission denied");    return    // FIXME: Sane realm.    Roxen.http_auth_required("foo",    "<h1>Permission to 'PUT' files denied</h1>");    }    register_lock(path, lock, id);    return 0;   }    + mapping(string:mixed) unlock_file(string path, DAVLock lock, RequestID|int(0..0) id) + { +  if (!query("put")) return 0; +  if(query("check_auth") && (!id || (!id->conf->authenticate( id ) )) ) { +  TRACE_LEAVE("PUT: Permission denied"); +  return +  // FIXME: Sane realm. +  Roxen.http_auth_required("foo", +  "<h1>Permission to 'PUT' files denied</h1>"); +  } +  unregister_lock(path, lock, id); +  return 0; + } +    int dir_filter_function(string f, RequestID id)   {    if(f[0]=='.' && !dotfiles) return 0;    if(!tilde && Roxen.backup_extension(f)) return 0;    return 1;   }      array(string) list_lock_files() {    return query("nobrowse");   }
Roxen.git/server/modules/filesystems/filesystem.pike:1320:    moves++;       /* Clear the stat-cache for this file */    if (stat_cache) {    cache_set("stat_cache", moveto, 0);    cache_set("stat_cache", f, 0);    }       if(!code)    { -  SIMPLE_TRACE_LEAVE("MOVE: Move failed (errno: %d)", err_code); +  SIMPLE_TRACE_LEAVE("MOVE: Move failed (%s)", strerror (err_code));    return errno_to_status (err_code, 1, id);    }    TRACE_LEAVE("MOVE: Success");    TRACE_LEAVE("Success");    if (size != -1) return Roxen.http_status(204);    return Roxen.http_status(201);    }       case "DELETE":    if (size==-1) {