File type operations.
- Copyright:
-
- Crown Copyright 2016
- License:
-
- Apache-2.0
- Source:
Members
-
<static, constant> IGNORE_COMMON_BYTE_SEQUENCES
-
- Default Value:
-
- true
- Source:
Methods
-
<static> run_detect(input, args)
-
Detect File Type operation.
Parameters:
Name Type Description input
byte_array args
Array.<Object> - Source:
Returns:
- Type
- string
-
<static> run_scan_for_embedded_files(input, args)
-
Scan for Embedded Files operation.
Parameters:
Name Type Description input
byte_array args
Array.<Object> - Source:
Returns:
- Type
- string
-
<private, static> _magic_type(buf)
-
Given a buffer, detects magic byte sequences at specific positions and returns the
extension and mime type.Parameters:
Name Type Description buf
byte_array - Source:
Returns:
-
type
- Type
- Object
-
type.ext - File extension
- Type
- string
-
type.mime - Mime type
- Type
- string
-
[type.desc] - Description
- Type
- string