MCPcopy
hub / github.com/h2non/bimg / Write

Function Write

file.go:13–15  ·  view source on GitHub ↗

Write writes the given byte buffer into disk to the given file path.

(path string, buf []byte)

Source from the content-addressed store, hash-verified

11// Write writes the given byte buffer into disk
12// to the given file path.
13func Write(path string, buf []byte) error {
14 return ioutil.WriteFile(path, buf, 0644)
15}

Callers 15

TestWriteFunction · 0.85
TestImageResizeFunction · 0.85
TestImageGifResizeFunction · 0.85
TestImageGifToJpegFunction · 0.85
TestImagePdfToJpegFunction · 0.85
TestImageSvgToJpegFunction · 0.85
TestImageResizeAndCropFunction · 0.85
TestImageExtractFunction · 0.85
TestImageExtractZeroFunction · 0.85
TestImageEnlargeFunction · 0.85
TestImageEnlargeAndCropFunction · 0.85
TestImageCropFunction · 0.85

Calls

no outgoing calls

Tested by 15

TestWriteFunction · 0.68
TestImageResizeFunction · 0.68
TestImageGifResizeFunction · 0.68
TestImageGifToJpegFunction · 0.68
TestImagePdfToJpegFunction · 0.68
TestImageSvgToJpegFunction · 0.68
TestImageResizeAndCropFunction · 0.68
TestImageExtractFunction · 0.68
TestImageExtractZeroFunction · 0.68
TestImageEnlargeFunction · 0.68
TestImageEnlargeAndCropFunction · 0.68
TestImageCropFunction · 0.68