|
Class: PersistentFileHistory
Object
|
+--PersistentFileHistory
- Package:
- stx:libbasic2
- Category:
- Interface-Framework
- Version:
- rev:
1.1
date: 2019/07/24 06:31:09
- user: cg
- file: PersistentFileHistory.st directory: libbasic2
- module: stx stc-classLibrary: libbasic2
- Author:
- Claus Gittinger
Support code tp provide a common access layer for persistent storage for applications.
For example, a persistent history of previously opened files.
On Windows systems, this is stored in the registry.
On Unix systems, it is stored in the user's home folder under '.smalltalk/registry/...'.
Both registry and directory use the same hierarchical structure.
PersistentFileHistory new
applicationKey:'GDBApplication';
fileHistory
instance creation
-
new
-
return an initialized instance
accessing - configuration
-
applicationKey: aString
-
this is used as the key under which the application's values are stored.
In the registry, this is the last key above the history entry);
if files are used, this is the folder name above which history, and other files are stored.
By default, the name of the application without prefix is used.
-
fileHistorySize
-
defines the number of remembered files in the history
-
fileHistorySizeLimit: something
-
-
topDirectoryName: topKeyName
-
defaults to '.smalltalk',
but can be changed to '.expecco'.
-
topRegistryKeyName: topKeyName
-
defaults to 'SmalltalkX',
but can be changed to 'Expecco'.
accessing - file history
-
addToFileHistory: aFilename
-
remember a filename in the file history
-
fileHistory
-
return the file history
-
fileHistoryFilteredForStillExistingFilesDo: aBlock removeNonExisting: aBoolean
-
remove all non-existing history entries
file history support
-
registryKeyForApplication
-
HKEY_CURRENT_USER\Software\Exept\SmalltalkX\<appname>
usage example(s):
self registryKeyForApplication
|
-
registryKeyForFileHistory
-
HKEY_CURRENT_USER\Software\Exept\SmalltalkX\<appName>\History
usage example(s):
self registryKeyForFileHistory
|
initialization
-
initialize
-
can be set to '.expecco'
private
-
directoryForFileHistory
-
the filename where the history is made persistent.
This depends on the owningApplication which should not be nil.
usage example(s):
self new directoryForFileHistory
|
-
fetchFileHistoryFromPersistentStore
-
-
initializeFileHistory
-
-
makeFileHistoryPersistent
-
remove the remaining keys
|