|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.shell.ShellHistoryManager
public class ShellHistoryManager
Used to manage shell history.
Using this class is fairly basic: you can add elements to the shell history through
add(String) and browse it through getHistoryIterator().
| Method Summary | |
|---|---|
static void |
add(java.lang.String command)
Adds the specified command to shell history. |
static void |
addListener(ShellHistoryListener listener)
Registers a listener to changes in the shell history. |
static void |
clear()
Completely empties the shell history. |
static AbstractFile |
getHistoryFile()
Returns the path to the shell history file. |
static java.util.Iterator |
getHistoryIterator()
Returns a non thread-safe iterator on the history. |
static void |
loadHistory()
Loads the shell history. |
static void |
setHistoryFile(AbstractFile file)
Sets the path of the shell history file. |
static void |
setHistoryFile(java.io.File file)
Sets the path of the shell history file. |
static void |
setHistoryFile(java.lang.String path)
Sets the path of the shell history file. |
static void |
writeHistory()
Writes the shell history to hard drive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void addListener(ShellHistoryListener listener)
listener - listener to register.public static void clear()
public static java.util.Iterator getHistoryIterator()
public static void add(java.lang.String command)
command - command to add to the shell history.
public static void setHistoryFile(java.lang.String path)
throws java.io.FileNotFoundException
path - where to load the shell history from.
java.io.FileNotFoundException - if path is not accessible.getHistoryFile(),
setHistoryFile(File),
setHistoryFile(AbstractFile)
public static void setHistoryFile(java.io.File file)
throws java.io.FileNotFoundException
file - where to load the shell history from.
java.io.FileNotFoundException - if path is not accessible.getHistoryFile(),
setHistoryFile(AbstractFile),
setHistoryFile(String)
public static void setHistoryFile(AbstractFile file)
throws java.io.FileNotFoundException
file - where to load the shell history from.
java.io.FileNotFoundException - if path is not accessible.getHistoryFile(),
setHistoryFile(File),
setHistoryFile(String)
public static AbstractFile getHistoryFile()
throws java.io.IOException
This method cannot guarantee the file's existence, and it's up to the caller to deal with the fact that the user might not actually have created a history file yet.
This method's return value can be modified through setHistoryFile(String).
If this wasn't called, the default path will be used: DEFAULT_HISTORY_FILE_NAME
in the preferences folder.
java.io.IOException - if an error occured while locating the default shell history file.setHistoryFile(File),
setHistoryFile(String),
setHistoryFile(AbstractFile)
public static void writeHistory()
throws java.io.IOException
java.io.IOException - if an I/O error occurs.
public static void loadHistory()
throws java.lang.Exception
java.lang.Exception - if an error occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard