Roxen.git / server / base_server / module.pike

version» Context lines:

Roxen.git/server/base_server/module.pike:2037:    Stdio.File file=Stdio.File();    if(!file->open(path,"r")) return 0;    if(has_suffix(index, "()"))    index = index[..sizeof(index) - 3];       // Pass path to original file so that include statements for local files    // work correctly.    return compile_string((pre || "") + file->read(), path)[index];   }    + #if constant(roxen.FSGarbWrapper) + //! Register a filesystem path for automatic garbage collection. + //! + //! @param path + //! Path in the real filesystem to garbage collect. + //! + //! @param max_age + //! Maximum allowed age in seconds for files. + //! + //! @param max_size + //! Maximum total size in bytes for all files under the path. + //! Zero to disable the limit. + //! + //! @param max_files + //! Maximum number of files under the path. + //! Zero to disable the limit. + //! + //! @returns + //! Returns a roxen.FSGarbWrapper object. The garbage collector + //! will be removed when this object is destructed (eg via + //! refcount-garb). + roxen.FSGarbWrapper register_fsgarb(string path, int max_age, +  int|void max_size, int|void max_files) + { +  return roxen.register_fsgarb(module_identifier(), path, max_age, +  max_size, max_files); + } + #endif +    private mapping __my_tables = ([]);      array(mapping(string:mixed)) sql_query( string query, mixed ... args )   //! Do a SQL-query using @[get_my_sql], the table names in the query   //! should be written as &table; instead of table. As an example, if   //! the tables 'meta' and 'data' have been created with create_tables   //! or get_my_table, this query will work:   //!   //! SELECT &meta;.id AS id, &data;.data as DATA   //! FROM &data;, &meta; WHERE &my.meta;.xsize=200