Infer.Text (Infer v0.1.0) View Source
Text type matchers based on the magic number
Link to this section Summary
Functions
Takes the binary file contents as arguments. Returns true
if it's html.
Takes the binary file contents as arguments. Returns true
if it's a shell script.
Takes the binary file contents as arguments. Returns true
if it's xml.
Link to this section Functions
Specs
Takes the binary file contents as arguments. Returns true
if it's html.
See: https://mimesniff.spec.whatwg.org/
Examples
iex> Infer.Text.is_html("<!DOCTYPE html>")
true
iex> Infer.Text.is_html(" <BODY>")
true
iex> Infer.Text.is_html("<")
false
Specs
Takes the binary file contents as arguments. Returns true
if it's a shell script.
Specs
Takes the binary file contents as arguments. Returns true
if it's xml.