diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-16 16:19:03 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-16 16:19:03 +0200 |
| commit | 0386d999403f78248aeda91d0cee1bd4716b8dda (patch) | |
| tree | cdbd81ce7439d97e1bc73295690655639d3262e2 /examples/tools | |
| parent | 333833ab80dcbd5434aae120c76fc7b60b897cd1 (diff) | |
| download | desktop-assistant-0386d999403f78248aeda91d0cee1bd4716b8dda.tar.gz desktop-assistant-0386d999403f78248aeda91d0cee1bd4716b8dda.zip | |
Read a nameless file's content to tell whether it is text
A file whose name gives no type, such as a shebang script or a Makefile,
was refused as not text. When mimetypes knows nothing, the first 4 KB
decide: no NUL and valid UTF-8 (a character cut by the window allowed)
is text. A name that does say something, even application/octet-stream,
is still taken at its word.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'examples/tools')
0 files changed, 0 insertions, 0 deletions
