public class FileHistory
extends java.lang.Object
# are ignored.| Modifier and Type | Class and Description |
|---|---|
static class |
FileHistory.Listener
A class that will dynamically add the latest entries for a
FileHistory onto a menu.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FILE
The name of the client property used to access the File that identifies
which dynamically added menu entry has been selected.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.io.File file)
Add a new file to the history.
|
static FileHistory |
getFileHistory(java.io.File wdFile,
java.lang.String name)
Get a shared FileHistory object for a specified file and path to work directory.
|
static FileHistory |
getFileHistory(WorkDirectory wd,
java.lang.String name)
Get a shared FileHistory object for a specified file and work directory.
|
java.io.File |
getLatestEntry()
Get the latest valid entry from a file history object.
|
java.io.File[] |
getRecentEntries(int count)
Get the most recent entries from the history.
|
java.io.File |
getRelativeLatestEntry(java.lang.String newRoot,
java.lang.String oldRoot) |
public static final java.lang.String FILE
FileHistory.Listener,
Constant Field Valuespublic static FileHistory getFileHistory(WorkDirectory wd, java.lang.String name)
wd - The work directory in which the history file is maintained.name - The name of the file within the work direectory's jtData/
subdirectory.public static FileHistory getFileHistory(java.io.File wdFile, java.lang.String name)
wdFile - The path th work directory in which the history file is maintained.name - The name of the file within the work direectory's jtData/
subdirectory.public void add(java.io.File file)
file - the file to be added to the historypublic java.io.File[] getRecentEntries(int count)
count - the number of most recent, existing files
to be returned.public java.io.File getLatestEntry()
public java.io.File getRelativeLatestEntry(java.lang.String newRoot,
java.lang.String oldRoot)
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.