Documentation ¶
Overview ¶
patchwork provides on-the-fly way to replace files on ISO9660 image. RockRidge extention is also supperted partially.
Index ¶
Constants ¶
const (
SECTOR_SIZE uint32 = 2 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
Device is data layer which Image write updated contents to and read original contents from. You can use os.File as Device.
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
Image represents rewritable ISO9660 disk image.
func NewImageFromFile ¶
Create instance from image file. Changes will be applied directly. If you prefer to avoid change original file, use NewOverlayedImageFromFile instead.
func NewOverlayedImageFromFile ¶
Create instance from image file with overlay reader as a device. Changes won't be applied to original file.
func (*Image) UpdateFile ¶
UpdateFile updates file in image.
path is a file which will be replaced. It must be a path on RockRidge extention and a valid and existent filename on image's filesystem. (e.g. /EFI/BOOT/grub.cfg)
id is new filename, which is used when the image read as raw-ISO9660 filesystem.
name is also new filename, which is used when the image read as ISO9660 with RockRidge extention.
data is a content which will be written.