multivalent.std.adaptor

Class LocalDirectory

public class LocalDirectory extends ArchiveMediaAdaptor

MediaAdaptor that displays contents of a local directory. Reads directory and generates HTML which is passed on to HTML media adaptor. HTML nodes should be publicly available so nodes can be directly created, rather than have a string generated only to be immediately parsed. Initial sorting by filename done by throwing a TableSort event, rather than built in.

LATER: make into tree browser, with contents of subdirectories loaded on demand. LATER: in fielded display, choice of which fields to show (like BeOS)

Version: $Revision: 1.8 $ $Date: 2002/10/19 08:31:46 $

Field Summary
static StringFIELDS
static StringMSG_SET_BKUP
Toggle between showing backup files ("...~", "....bkup", ...).
static StringMSG_SET_DIRTYPE
Toggle between short name-only and full with dates and so on.
static StringPREF_NOBKUP
static StringPREF_TYPE
static StringSHORT
Method Summary
protected longbuildFields(StringBuffer hsb, File f, File[] dirlist)
LATER: control which fields to show from Preferences, like BeOS.
protected longbuildShort(StringBuffer hsb, File f, File[] dirlist)
Concise, 5-across list, like UNIX ls, except list across not down so that table sorting works right.
FileextractFile(File archive, String filename, File outdir)
No-op -- already done.
List<ArchiveFileEntry>getCatalog(File archive)
protected String[]getPatterns()
No-op -- already done.
Objectparse(INode parent)
booleansemanticEventAfter(SemanticEvent se, String msg)
booleansemanticEventBefore(SemanticEvent se, String msg)
Choose between short and fielded displays.
StringtoHTML(String path)

Field Detail

FIELDS

public static final String FIELDS

MSG_SET_BKUP

public static final String MSG_SET_BKUP
Toggle between showing backup files ("...~", "....bkup", ...).

"setShowBackup": arg= java.lang.String boolean or java.lang.Boolean or null to toggle.

MSG_SET_DIRTYPE

public static final String MSG_SET_DIRTYPE
Toggle between short name-only and full with dates and so on.

"setDirectoryType": arg= SHORT or FIELDS or null to toggle.

PREF_NOBKUP

public static final String PREF_NOBKUP

PREF_TYPE

public static final String PREF_TYPE

SHORT

public static final String SHORT

Method Detail

buildFields

protected long buildFields(StringBuffer hsb, File f, File[] dirlist)
LATER: control which fields to show from Preferences, like BeOS.

Returns: sum of file lengths.

buildShort

protected long buildShort(StringBuffer hsb, File f, File[] dirlist)
Concise, 5-across list, like UNIX ls, except list across not down so that table sorting works right.

Returns: sum of file lengths.

extractFile

public File extractFile(File archive, String filename, File outdir)
No-op -- already done.

getCatalog

public List<ArchiveFileEntry> getCatalog(File archive)

getPatterns

protected String[] getPatterns()
No-op -- already done.

parse

public Object parse(INode parent)

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se, String msg)

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se, String msg)
Choose between short and fielded displays.

toHTML

public String toHTML(String path)