eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'PersistentFileHistory':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: PersistentFileHistory


Inheritance:

   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

Description:


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
    


Class protocol:

instance creation
o  new
return an initialized instance


Instance protocol:

accessing - configuration
o  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.

o  fileHistorySize
defines the number of remembered files in the history

o  fileHistorySizeLimit: something

o  topDirectoryName: topKeyName
defaults to '.smalltalk',
but can be changed to '.expecco'.

o  topRegistryKeyName: topKeyName
defaults to 'SmalltalkX',
but can be changed to 'Expecco'.

accessing - file history
o  addToFileHistory: aFilename
remember a filename in the file history

o  fileHistory
return the file history

o  fileHistoryFilteredForStillExistingFilesDo: aBlock removeNonExisting: aBoolean
remove all non-existing history entries

file history support
o  registryKeyForApplication
HKEY_CURRENT_USER\Software\Exept\SmalltalkX\<appname>

usage example(s):

     self registryKeyForApplication 

o  registryKeyForFileHistory
HKEY_CURRENT_USER\Software\Exept\SmalltalkX\<appName>\History

usage example(s):

     self registryKeyForFileHistory

initialization
o  initialize
can be set to '.expecco'

private
o  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

o  fetchFileHistoryFromPersistentStore

o  initializeFileHistory

o  makeFileHistoryPersistent
remove the remaining keys



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 20 Apr 2024 09:55:42 GMT