bcca941999-12-19Marcus Comstedt /*
0917d32013-03-04Anders Johansson  * $Id$
bcca941999-12-19Marcus Comstedt  * */
4a2bd12000-02-21Marcus Comstedt package com.roxen.roxen;
bcca941999-12-19Marcus Comstedt 
1fcecd2000-02-03Marcus Comstedt /** * The interface for modules which have a specific URL path in the * virtual file system. * * @see Module * * @version $Version$ * @author marcus */
bcca941999-12-19Marcus Comstedt public interface LocationModule {
1fcecd2000-02-03Marcus Comstedt  /** * Returns the URL path handled by this module. * * @return the path name */
cea5811999-12-19Marcus Comstedt  String queryLocation();
1fcecd2000-02-03Marcus Comstedt  /** * Request a file from this module. * * @param f the path of the file relative to the location of * this module * @param id the request object * @return a response, or <code>null</code> if no such * file exists. */
bcca941999-12-19Marcus Comstedt  RoxenResponse findFile(String f, RoxenRequest id);
1fcecd2000-02-03Marcus Comstedt  /** * List the contents of a directory. * * @param f the path of the directory relative to the location of * this module * @param id the request object * @return a list of filenames, or <code>null</code> if no such * directory exists. */
41857d2000-01-10Marcus Comstedt  String[] findDir(String f, RoxenRequest id);
1fcecd2000-02-03Marcus Comstedt  /** * Get the real filename of a file. * * @param f the path of the file relative to the location of * this module * @param id the request object * @return the path of the file in the host filesystem, or * <code>null</code> if this resource is not a real * file. */
41857d2000-01-10Marcus Comstedt  String realFile(String f, RoxenRequest id);
1fcecd2000-02-03Marcus Comstedt  /** * Get the attributes of a file or directory. * The attributes are a set of 7 integers. These are: <code>mode</code>, * <code>size</code>, <code>atime</code>, <code>mtime</code>, * <code>ctime</code>, <code>uid</code>, <code>gid</code>. * * @param f the path of the file or directory relative to the * location of this module * @param id the request object * @return the attributes of this file or directory, or * <code>null</code> if this information is not available. */
41857d2000-01-10Marcus Comstedt  int[] statFile(String f, RoxenRequest id);
bcca941999-12-19Marcus Comstedt  }