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.