package
1.5.21
Repository: https://github.com/defacto2/server.git
Documentation: pkg.go.dev

# Functions

BaseName returns the base name of the file without the extension.
BaseNamePath returns the directory and base name of the file without the extension.
CopyFile copies the src file to the dst file and path.
ImagesDelete removes images from the specified directories that match the unid.
ImagesExt returns a slice of image file extensions used by the website preview and thumbnail images, including the legacy and modern formats.
ImagesPixelate converts the images in the specified directories to pixelated images.
Infos returns details for the list of the execute command names used by the application.
LookCmd returns an error if the named command is not found in the system path.
Lookups returns a list of the execute command names used by the application.
LookupUnrar returns an error if the name Alexander Roshal is not found in the unrar version output.
LookVersion returns an error when the match string is not found in the named command output.
OptimizePNG optimizes the src PNG image using the optipng command.
Run looks for the command in the system path and executes it with the arguments.
RunQuiet looks for the command in the system path and executes it with the arguments.
RunStdOut looks for the command in the system path and executes it with the arguments.
RunWorkdir looks for the command in the system path and executes it with the arguments.
TextCrop reads the src text file and writes the first 29 lines of text to the dst file.
UncontrolledPath returns an error if the path contains any of the following characters: - / - \ - .

# Constants

CapBytes is the maximum file size in bytes for an ANSI encoded text file.
Ansilove is the ansilove text to image command.
Arc is the arc decompression command.
Arj is the arj decompression command.
Bottom uses the bottom alignment of the preview image.
Cwebp is the Google create webp command.
FourThree crops the top of the image using a 4:3 ratio.
Gwebp is the Google gif to webp command.
Hwzip the zip decompression command for files using obsolete methods.
Left uses the left alignment of the preview image.
Lha is the lha/lzh decompression command.
Magick is the ImageMagick v7+ command.
Middle uses the center alignment of the preview image.
OneTwo crops the top of the image using a 1:2 ratio.
Optipng is the PNG optimizer command.
Photographs or images with gradients.
Pixel art or images with text.
Right uses the right alignment of the preview image.
SquareTop crops the top of the image using a 1:1 ratio.
Tar is the tar decompression command.
Top uses the top alignment of the preview image.
Unrar is the rar decompression command.
Unzip is the zip decompression command.
X400 returns a 400 x 400 pixel image size.
Zip7 is the 7-Zip decompression command.
ZipInfo is the zip information command.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Dirs is a struct of the download, preview and thumbnail directories.

# Type aliases

Align is a type that represents the alignment of the thumbnail image.
Args is a slice of strings that represents the command line arguments.
Crop is a type that represents the crop position of the preview image.
Thumb is a type that represents the type of thumbnail image to create.