Roxen.git
/
server
/
modules
/
examples
/
location.pike
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/modules/examples/location.pike:1:
+
#include <module.h>
inherit "module"; // All roxen modules must inherit module.pike
-
constant cvs_version = "$Id: location.pike,v 1.
1
2000/
07
/
19
16
:
21
:
23
jhs
Exp $";
+
constant cvs_version = "$Id: location.pike,v 1.
2
2000/
08
/
28
05
:
31
:
54
per
Exp $";
constant module_type = MODULE_LOCATION; constant module_name = "RefDoc for MODULE_LOCATION"; constant module_doc = "This module does nothing, but its inlined " "documentation gets imported into the roxen " "programmer manual. You really don't want to " "add this module to your virtual server, promise!"; // see common_api.pike for further explanations of the above constants void create()
Roxen.git/server/modules/examples/location.pike:63:
string query_location() //! Returns the location in the virtual server's where your location //! module is mounted. If you make a location module and leave out //! this method, the default behaviour inherited from module.pike //! will return the value of the module variable 'location'. { return query( "mountpoint" ); }
-
array(int) stat_file( string path, RequestID id )
+
array(int)
|Stat
stat_file( string path, RequestID id )
//! The stat_file() method emulates Pike's <pi>file_stat()</pi> //! method, returning information about a file or directory. path //! is the path to the file or directory in the module's name space, //! id is the request information object. //! //! stat_file() is most commonly used by directory type modules to //! provide informative directory listings, or by the ftp protocol //! module to create directory listings. //!
-
//! The return value it is expected to be an array of integers in the
-
//!
following format:
+
//! The return value it is expected to be
either a Stat object, or
an
+
//!
array of integers in the following format:
//! //! ({ mode, size, atime, mtime, ctime, uid, gid }) //! //! <tt>mode</tt> is an integer containing the unix file permissions //! of the file. It can be ignored. //! //! <tt>size</tt> is an integer containing the size of the file, or a //! special value in case the object is not actually a file. Minus two //! means that it is a directory, minus three that it is a symbolic //! link and minus four that it is a device special file. This value