Scan your whole stack
Are you using oaknut-adfs?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v13.7.0
oaknut-adfs was last scanned on 29 Nov 2026 at version 13.7.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 13.7.0 LATEST | 29 Nov 2026 | No rules fired |
| 13.6.1 | 7 Nov 2026 | No rules fired |
| 13.6.0 | 6 Nov 2026 | No rules fired |
| 13.5.0 | 23 Oct 2026 | Not shown |
| 13.4.0 | 15 Oct 2026 | Not shown |
Findings for v13.7.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 13.7.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A Python library for reading, writing, and creating Acorn ADFS (Advanced Disc Filing System) disc images — the hierarchical filing system used by the BBC Master, Acorn Archimedes, and RISC OS.
oaknut-adfs opens ADFS floppy and hard-disc images to browse the directory
tree, read and write files and directories, inspect and edit RISC OS
metadata (filetypes, datestamps, access), and create new formatted discs —
from Python, with a pathlib-inspired API.
Looking for DFS? The flat-catalogue Disc Filing System of the BBC Micro is a separate filing system in the sibling
oaknut-dfspackage (from oaknut.dfs import DFS). For a unified command-line tool across DFS, ADFS, AFS, ROMFS and ZIP, seeoaknut-disc.
Part of the oaknut monorepo.
ADFS evolved across three machine generations. oaknut-adfs reads, writes, and creates every standard floppy format and the FileCore hard-disc layout:
| Format | Map | Directory | Capacity | Sector | Zones | Notes |
|---|---|---|---|---|---|---|
| S | Old | Old | 160 KB | 256 B | — | 40-track single-sided; ADFS on the BBC B / Electron |
| M | Old | Old | 320 KB | 256 B | — | 80-track single-sided |
| L | Old | Old | 640 KB | 256 B | — | 80-track double-sided |
| D | Old | New | 800 KB | 1024 B | — | Arthur / the BBC Master 512 |
| E | New | New | 800 KB | 1024 B | 1 | double density; RISC OS |
| E+ | New | Big | 800 KB | 1024 B | 1 | RISC OS 4 — long filenames |
| F | New | New | 1600 KB | 1024 B | 4 | high density; RISC OS |
| F+ | New | Big | 1600 KB | 1024 B | 4 | RISC OS 4 — long filenames |
| G | New | New | 3200 KB | 1024 B | 8 | extra-high density; rarely used |
| G+ | New | Big | 3200 KB | 1024 B | 8 | RISC OS 4 — long filenames; rarely used |
| Hard disc | New | New / Big | multi-megabyte | 256 / 512 B | many | Archimedes / RISC OS FileCore |
The map and directory are independent axes; the format letter is shorthand for a particular pairing.
(start, length) pairs, guarded by two additive checksums. Files occupy
contiguous sectors. Used by S, M, L and D.0x04 describes the geometry; a zoned allocation bitmap tracks
variable-length fragments addressed by a fragment id plus a sector offset.
This is what lifts the size ceiling of the old map and allows the multi-zone
F and G formats and large hard discs. Used by E, F, G and their +
variants.Hugo) — a fixed 1280-byte block, up to 47 entries,
10-character names. Used by S, M and L.Hugo / Nick) — a fixed 2048-byte block, 10-character
names, carrying the 32-bit RISC OS load/exec fields. Used by D, E, F and G.SBPr / oven) — a variable-size block with a packed
name heap, supporting filenames of up to 255 characters. Used by the +
formats (E+, F+, G+).New-map hard discs are read, written, and created in both common on-disc layouts:
.hdf — RPCEmu / Arculator IDE images, where FileCore numbers sectors
from low_sector, placing disc address 0 at a 0x200 offset. Detected and
handled by content..dat / .dsc — a raw image with a 22-byte SCSI geometry sidecar; the
New-map geometry is read from the disc record, so the sidecar is optional.RISC OS is a 32-bit system, and its per-file metadata lives in the load and execution address fields:
&FFF, the field encodes a 12-bit filetype and a 40-bit datestamp
(centiseconds since 1900) rather than genuine addresses. oaknut-adfs stores
both the raw fields and, through the
oaknut.filesystem
capability layer, the decoded filetype and datestamp. On the RISC OS
formats a file written with no addresses, and every new directory, is
stamped as RISC OS stamps it: Data (&FFD) and the time of writing —
pass filetype= / datestamp= to choose them.L) bit, via
the shared
oaknut-file
Access type.Content-based identification (via oaknut.filesystem) recognises every map
and directory combination above, so a disc need not be labelled by extension.
uv add oaknut-adfs # or: pip install oaknut-adfs
oaknut-adfs works with any PEP 517 build
front-end and package manager; the examples use
uv.
The format is auto-detected from the image content (and, where content is ambiguous, the file extension). Pass a format only to override detection.
from oaknut.adfs import ADFS
with ADFS.from_file("RISCOS.adf") as adfs:
print(adfs.title)
# Navigate with a pathlib-inspired API; "$" is the root.
for entry in (adfs.root / "$").iterdir():
s = entry.stat()
print(f"{entry.name:12s} {s.length:7d} load={s.load_address:08X}")
data = (adfs.root / "$" / "ReadMe").read_bytes()
print(len(data), "bytes")
Output:
0284,401-01
!NewLook 2048 load=FFFFFD44
OldTempl 2048 load=FFFFFD44
ReadMe 1820 load=FFFFFF44
TemplApp1 2048 load=FFFFFD44
TemplApp2 2048 load=FFFFFD44
TemplSupp 2048 load=FFFFFD44
1820 bytes
from_file opens the image read/write when host permissions allow; pass
read_only=True to guarantee a shared image cannot be modified.
Every floppy format has a module constant. Pass it to create_file:
from oaknut.adfs import ADFS, ADFS_E, ADFS_F_PLUS
# An 800 KB New-map E disc.
with ADFS.create_file("disc.adf", ADFS_E, title="RISCOS") as adfs:
(adfs.root / "$.ReadMe").write_bytes(b"oaknut-adfs demo", filetype=0xFFF) # Text
(adfs.root / "$.Apps").mkdir()
# A 1600 KB F+ disc, whose Big directories allow long filenames.
with ADFS.create_file("big.adf", ADFS_F_PLUS, title="Extended") as adfs:
(adfs.root / "$.AVeryLongFileNameIndeed").write_bytes(b"...")
for filename in ("disc.adf", "big.adf"):
with ADFS.from_file(filename) as adfs:
print(filename, adfs.title, [entry.name for entry in (adfs.root / "$").iterdir()])
Output:
disc.adf RISCOS ['Apps', 'ReadMe']
big.adf Extended ['AVeryLongFileNameIndeed']
from oaknut.adfs import ADFS
# Size a New-map hard disc from a capacity; big_directories=True selects
# the Big directory (E+/F+) layout.
adfs = ADFS.create_new_map_hard_disc("40MB", title="IDEDisc", big_directories=True)
print(adfs.title, adfs.total_size, adfs.free_space)
Output:
IDEDisc 40000000 38955520
validate() walks the whole disc — map, zone checks, and directory tree —
and returns a list of structural errors (empty when the disc is sound):
from oaknut.adfs import ADFS
with ADFS.from_file("disc.adf") as adfs:
errors = adfs.validate()
print(errors)
Output:
[]
The package is developed in the oaknut workspace. From the repository root:
uv sync # install all workspace members editable
uv run pytest packages/oaknut-adfs/tests # this package's tests
uv run ruff check # lint
A layered design, dependencies flowing strictly downward:
ADFS (adfs.py) user-facing ADFS / ADFSPath / ADFSStat
↓
directory.py ←→ free_space_map.py ←→ new_map.py
(Old/New/Big dirs) (old map) (FileCore new map)
↓
UnifiedDisc / Surface / SectorsView (from oaknut-discimage)
adfs.py — the user-facing ADFS, ADFSPath, ADFSStat; format
detection, the format constants, and disc creation.directory.py — the Old, New, and Big directory formats (parse, serialise,
and their respective check-byte algorithms).free_space_map.py — the old-map free-space map and its checksums.new_map.py — the FileCore disc record, zoned allocation bitmap, fragment
allocation and sharing, and blank-image formatting.filesystem.py — the oaknut.filesystem adapter: content identification,
the mount, and the Filetyped / Datestamped capabilities.Sector-level access (Surface, SectorsView, UnifiedDisc) lives in
oaknut-discimage;
metadata and the acorn codec in
oaknut-file;
BBC BASIC (de)tokenisation in
oaknut-basic.
oaknut-adfs and oaknut-dfs are independent siblings: from oaknut.dfs import ADFS does not work — ADFS lives in oaknut.adfs.
.inf
sidecar metadata format..inf files, which oaknut follows.MIT — see LICENSE.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.