import javax.servlet.http.*;
/** An exceptionally crude implementation of Mailbox relying on POSIXy filesystem semantics */
-public class FileBasedMailbox extends Mailbox.Default implements MailboxTree {
+public class FileBasedMailbox extends Mailbox.Default implements MailTree {
public static final long MAGIC_DATE = 0;
private static final char slash = File.separatorChar;
private static final WeakHashMap<String,FileBasedMailbox> instances = new WeakHashMap<String,FileBasedMailbox>();
public String toString() { return "[FileBasedMailbox " + path.getAbsolutePath() + "]"; }
- public MailboxTree slash(String name, boolean create) { return getFileBasedMailbox(path.getAbsolutePath()+slash+name, create); }
+ public MailTree slash(String name, boolean create) { return getFileBasedMailbox(path.getAbsolutePath()+slash+name, create); }
public void rmdir(String subdir) { throw new RuntimeException("FIXME not implemented"); }
- public void rename(String subdir, MailboxTree newParent, String newName) { throw new RuntimeException("FIXME not implemented"); }
+ public void rename(String subdir, MailTree newParent, String newName) { throw new RuntimeException("FIXME not implemented"); }
public Mailbox getMailbox() { return this; }
public JS get(JS key) throws JSExn {
}
// FIXME: should be a File()
- public static synchronized MailboxTree getFileBasedMailbox(String path, boolean create) {
+ public static synchronized MailTree getFileBasedMailbox(String path, boolean create) {
try {
- MailboxTree ret = instances.get(path);
+ MailTree ret = instances.get(path);
if (ret == null) {
if (!create && !(new File(path).exists())) return null;
ret = new FileBasedMailbox(new File(path));