Safe Haskell | None |
---|---|
Language | Haskell2010 |
Effectful functions that create and convert disk image files.
Synopsis
- materializeImageSource :: IsB9 e => ImageSource -> Image -> Eff e ()
- substImageTarget :: forall e. (HasCallStack, Member EnvironmentReader e, Member ExcB9 e) => ImageTarget -> Eff e ImageTarget
- preferredDestImageTypes :: IsB9 e => ImageSource -> Eff e [ImageType]
- preferredSourceImageTypes :: HasCallStack => ImageDestination -> [ImageType]
- resolveImageSource :: IsB9 e => ImageSource -> Eff e Image
- createDestinationImage :: IsB9 e => Image -> ImageDestination -> Eff e ()
- resizeImage :: IsB9 e => ImageResize -> Image -> Eff e ()
- importImage :: IsB9 e => Image -> Image -> Eff e ()
- exportImage :: IsB9 e => Image -> Image -> Eff e ()
- exportAndRemoveImage :: IsB9 e => Image -> Image -> Eff e ()
- convertImage :: IsB9 e => Image -> Image -> Eff e ()
- shareImage :: IsB9 e => Image -> SharedImageName -> Eff e SharedImage
- ensureAbsoluteImageDirExists :: IsB9 e => Image -> Eff e Image
- getVirtualSizeForRawImage :: IsB9 e => FilePath -> Eff e (Either String Integer)
Documentation
materializeImageSource :: IsB9 e => ImageSource -> Image -> Eff e () Source #
Create an image from an image source. The destination image must have a compatible image type and filesystem. The directory of the image MUST be present and the image file itself MUST NOT alredy exist.
substImageTarget :: forall e. (HasCallStack, Member EnvironmentReader e, Member ExcB9 e) => ImageTarget -> Eff e ImageTarget Source #
Replace $... variables inside an ImageTarget
preferredDestImageTypes :: IsB9 e => ImageSource -> Eff e [ImageType] Source #
Return all valid image types sorted by preference.
preferredSourceImageTypes :: HasCallStack => ImageDestination -> [ImageType] Source #
Return all supported source ImageType
s compatible to a ImageDestinaion
in the preferred order.
resolveImageSource :: IsB9 e => ImageSource -> Eff e Image Source #
Resolve an ImageSource to an Image
. The ImageSource might
not exist, as is the case for EmptyImage
.
createDestinationImage :: IsB9 e => Image -> ImageDestination -> Eff e () Source #
Convert some Image
, e.g. a temporary image used during the build phase
to the final destination.
resizeImage :: IsB9 e => ImageResize -> Image -> Eff e () Source #
Resize an image, including the file system inside the image.
importImage :: IsB9 e => Image -> Image -> Eff e () Source #
Import a disk image from some external source into the build directory if necessary convert the image.
exportImage :: IsB9 e => Image -> Image -> Eff e () Source #
Export a disk image from the build directory; if necessary convert the image.
exportAndRemoveImage :: IsB9 e => Image -> Image -> Eff e () Source #
Export a disk image from the build directory; if necessary convert the image.
convertImage :: IsB9 e => Image -> Image -> Eff e () Source #
Convert an image in the build directory to another format and return the new image.
shareImage :: IsB9 e => Image -> SharedImageName -> Eff e SharedImage Source #
Publish an sharedImage made from an image and image meta data to the configured repository
ensureAbsoluteImageDirExists :: IsB9 e => Image -> Eff e Image Source #
Create the parent directories for the file that contains the Image
.
If the path to the image file is relative, prepend _projectRoot
from
the B9Config
.