FileMan is a thin wrapper for various Smalltalk file libraries. It provides simple, portable interfaces for manipulating files and directories.
Currently, FileMan can wrap those different Smalltalk file libraries.
- FileDirectory (Squeak, Cuis)
- FileSystem (Pharo)
- Filename (VisualWorks)
This repository is mainly for Pharo and Squeak.
Cuis now includes FileMan as a default file library. Repository for Cuis version is kept for historical reasons.
VW version is available on Public StORE repository. Please load FileMan(Bundle) from StORE.
Metacello new
baseline: 'FileMan';
repository: 'github://mumez/FileMan/repository';
load.
Installer squeaksource
project: 'MetacelloRepository';
install: 'ConfigurationOfFileMan'.
(Smalltalk at: #ConfigurationOfFileMan) perform: #load.
"Before (legacy Squeak)"
subDir := FileDirectory default directoryNamed: 'subDir'.
subDir assureExistence.
[str := subDir newFileNamed: 'file1'.
str nextPutAll: 'Hello!']
ensure: [str close].
"After installation of FileMan"
'./subDir' asDirectoryEntry at: 'file2' put: 'Hello!'
By installing FileMan, you can write simple, portable file manipulation code in different Smalltalk dialects/file libraries.