Module special

Module special 

Source
Expand description

Filesystem and inode special file detection subsystem ported from fsmagic.c in file.

Provides explicit detection for empty (0-byte) streams, very short (1–3 byte) streams without magic, and special filesystem entities (directories, symlinks, FIFOs, sockets, block and character devices).

Functions§

detect_empty_file
Detects whether a source is an empty 0-byte file/stream.
detect_special_entity
Evaluates special filesystem entity hints (directory, symlink, fifo, socket, devices).
detect_very_short_file
Detects whether a source is very short (1–3 bytes) without recognizable magic signatures.