A component file (jfile) can be thought of as a boxed list stored in a file. An item of the boxed list on file is referred to as a component. The script jfiles.ijs provides the utilities for working with jfiles.
load 'jfiles' f =. 'user\data.jf' jcreate f 1 'first component' jappend f 0 (1.5+i.2 3) jappend f 1 ('asdf';23) jappend f 2 3 (<'mum';'dad') jappend f 4
The jsize result gives file information, including the indexes of the first and last items.
jsize f 0 5 1408 0 jread f;0 +---------------+ ¦first component¦ +---------------+ jread f;1 +-----------+ ¦1.5 2.5 3.5¦ ¦4.5 5.5 6.5¦ +-----------+ jread f;2 +----+ ¦asdf¦ +----+ jread f;3 +--+ ¦23¦ +--+ jread f;4 +---------+ ¦+-------+¦ ¦¦mum¦dad¦¦ ¦+-------+¦ +---------+ 'new' jreplace f;3 3 jread f;i.5 +----------------------------------------------+ ¦first component¦1.5 2.5 3.5¦asdf¦new¦+-------+¦ ¦ ¦4.5 5.5 6.5¦ ¦ ¦¦mum¦dad¦¦ ¦ ¦ ¦ ¦ ¦+-------+¦ +----------------------------------------------+
Jfiles are documented in the J Online Documentation.