X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fmail%2FFileBasedMailbox.java;fp=src%2Forg%2Fibex%2Fmail%2FFileBasedMailbox.java;h=4c9d4a59398accbf6f092f607a710a0f866cd7a5;hb=40e53cd3c7abe25902add4c97b8bc9202f3c8931;hp=066781a290993801b8f0d8c3ed576ba9a7d4f68a;hpb=c0cdaca74524315b01e9973c027e689627d3d58e;p=org.ibex.mail.git diff --git a/src/org/ibex/mail/FileBasedMailbox.java b/src/org/ibex/mail/FileBasedMailbox.java index 066781a..4c9d4a5 100644 --- a/src/org/ibex/mail/FileBasedMailbox.java +++ b/src/org/ibex/mail/FileBasedMailbox.java @@ -19,17 +19,17 @@ import javax.servlet.*; 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 instances = new WeakHashMap(); 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 { @@ -37,9 +37,9 @@ public class FileBasedMailbox extends Mailbox.Default implements MailboxTree { } // 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));