Ticket #122 (assigned enhancement)

Opened 11 months ago

Last modified 11 months ago

Expose IsoBuilder

Reported by: vreixo Owned by: vreixo
Priority: medium Milestone: libisofs-0.6.4
Component: libisofs Version: libisofs-0.6.3
Keywords: Cc:

Description

IsoBuilders are a powerfull system to customize IsoNode creation. It need to be exposed, but for that we need to complete its API and clarify its relation with IsoFileSource and IsoNode.

Change History

Changed 11 months ago by pygi

  • milestone set to libisofs-0.6.4

Changed 11 months ago by scdbackup

One would need to know more about IsoBuilder? in order to get an opinion.

Is this the way to get the byte-interval-cut-out node ?

Changed 11 months ago by vreixo

  • status changed from new to assigned

Is this the way to get the byte-interval-cut-out node ?

No. IsoBuilder is the responsible to create IsoNodes from IsoFileSources. Currently, it just creates an IsoNode with the same type of the original file. i.e., dirs lead to IsoDir, regular files to IsoFile, ... Now there is only an exception to this. If "follow_symlinks" flag is set, the IsoBuilder do not create an IsoSymlink from a symlink. Instead, it creates the node corresponding to the link destination.

My idea is to generalize this model, in order to allow more exotic combinations. For example, a good use case would be to create IsoFiles from block devices. That will appear as regular files on mounted image. This is useful, for example, to create a boot image from a floppy block device...

The idea is to implement IsoBuilder following the factory method pattern. Users could then change the way an IsoFileSource is mapped to an IsoNode.

Note: See TracTickets for help on using tickets.