headroom-0.2.2.1: License Header Manager

Copyright(c) 2019-2020 Vaclav Svejcar
LicenseBSD-3-Clause
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.FileType

Description

Module providing functions for working with the FileType, such as performing detection based on the file extension, etc.

Synopsis

Documentation

configByFileType Source #

Arguments

:: HeadersConfig

license headers configuration

-> FileType

selected FileType

-> HeaderConfig

appropriate HeaderConfig

Returns the proper HeaderConfig for the given FileType, selected from the HeadersConfig.

fileTypeByExt Source #

Arguments

:: HeadersConfig

license headers configuration

-> Text

file extension (without dot)

-> Maybe FileType

found FileType

Returns FileType for given file extension (without dot), using configured values from the HeadersConfig.

listExtensions Source #

Arguments

:: HeadersConfig

license headers configuration

-> FileType

FileType for which to list extensions

-> [Text]

list of appropriate file extensions

Lists all recognized file extensions for given FileType, using configured values from the HeadersConfig.