! TonelReader
I'm a monticello reader for tonel format repositories. I read
- a package per directory
- a class per file
- a set of extensions to a single class per file (for example, all extensions of a package to String will be in a single file)
I'm created on a file reference to a directory where the package will be read and the name of the package to read.
[[[
TonelReader on: 'someDirectoryWithTonelPackages' asFileReference filename: 'MyPackageName'
]]]
My main method is
- ==#definitions== reads and parses the tonel file, returns a list of monticello definitions.
- ==#snapshot== returns a monticello snapshot with the read definitions.
- ==#version== returns a monticello version with the read snapshot.
!! Implementation details
The monticello versions I return do have artificial information. Since I'm just meant to read versions from a directory, this directory has no information such as commit message, commit time, author, or ancestors. Check the method ==#loadVersionInfo== for more information.
! TonelWriter
I'm a monticello writer for tonel format, writing
- a package per directory
- a class per file
- a set of extensions to a single class per file (for example, all extensions of a package to String will be in a single file)
I'm created on a file reference to a directory where the package will be written.
[[[
TonelWriter on: ('someDirectory' asFileReference ensureCreateDirectory)
]]]
My main methods are
- ==#writeVersion:== that receives as argument a monticello version to write, from where I'll extract the corresponding monticello snapshot.
- ==#writeSnapshot:== that receives as argument a monticello snapshot to write, from where I'll write all the contained definitions.
!! Implementation details
Notice that while writing, if the written package/snapshot already exists in the directory I'll overwrite it (i.e., remove it and recreate it).