This machine's disk

Every rectangle is a file or a folder, drawn at the size of the space it takes up. Hover one to see what it is. Click a folder to go in.

This reads names, sizes and the date each thing last changed. It never opens a file and never reads what is inside one.

{{template "diskmap" .}}
{{define "diskmap"}} {{/* hx-swap="outerHTML" on this element and the poll attributes only while a scan runs: when the scan finishes, the fragment that replaces this one carries no hx-get, so the polling stops by itself rather than being switched off by script. */}}
{{if .Flash}}
{{.Flash}}
{{end}} {{if .Scanning}}

MAPPING {{if eq .Scope "machine"}}THIS WHOLE MACHINE{{else}}YOUR FILES{{end}}

{{.Entries}} things counted, {{.SeenSize}} so far · running for {{.Running}}.

{{if .SeenAt}}

{{.SeenAt}}

{{end}}

It keeps going if you close this page. Come back and it will be here.

{{end}} {{if not .HaveMap}} {{if not .Scanning}}

NO MAP YET

Nothing has been counted yet. Mapping walks the folders it can reach and adds up what is in them — on a large disk that takes a while, and it runs in the background.

{{range .RootNotes}}

{{.}}

{{end}} {{/* THE WHOLE MACHINE IS A SEPARATE REQUEST: a full drive map is something a person asks for. It reads into every account on the box, so it is asked for on its own, below the default, and it NAMES what it will walk before it is pressed. */}}

Mapping the whole machine is a bigger thing to ask for: it walks every drive, including folders that belong to other people who use this computer. It covers:

    {{range .MachineRoots}}
  • {{.}}
  • {{end}}
{{end}} {{else}} {{if .NotFound}}
That folder is not in this map. It may have been made after the map was taken — map the machine again to pick it up.
{{end}} {{/* THE ACCOUNTING BLOCK, above the picture and not below it. Everything here is a way the map is INCOMPLETE, and a caveat under a pretty picture is a caveat nobody reads. */}} {{if .Capped}}
This map stopped after counting as much as it is willing to hold in memory, at {{.CappedAt}}. Everything drawn is real and everything under that point is missing.
{{end}} {{if .Cancelled}}
This map was stopped before it finished, so it is a partial count. What is drawn is real; there is more on the disk.
{{end}} {{if .Stale}}
This map was taken {{.TakenAgo}} and things will have changed since. Map again for a current picture.
{{end}}
{{.Total}} · {{.Items}} things directly in here
{{.SVG}}

{{.Cells}} blocks drawn. {{if .Tiny}}{{.Tiny}} more are too small to draw at this size ({{.TinySize}} in total) — they are still counted in the block they sit inside. Click a folder to see them.{{end}} {{if .Overflow}}The picture stopped at its own limit of blocks; go into a folder to see the rest of it.{{end}}

{{if .Legend}}

What is in here

{{end}} {{if .Biggest}}

The biggest things here

{{range .Biggest}} {{end}}
NameSizeShareKindChanged
{{if .Dir}}{{.Name}}{{else}}{{.Name}}{{end}} {{.Size}} {{.Kind}} {{.Modified}}
{{if .MoreRow}}

and {{.MoreRow}} more, all smaller than these.

{{end}} {{end}}

About this map

This map is
{{if eq .Scope "machine"}}the whole machine — every drive, including folders belonging to other people who use this computer{{else}}your files only{{end}}
Taken
{{.TakenAgo}}, and it took {{.TookFor}}
Covers
{{range .Roots}}{{.Path}} — {{.Size}}
{{end}}
{{range .RootNotes}}

{{.}}

{{end}} {{/* WHAT IS NOT IN THE MAP. This is the honest half of the page and it is written out rather than summarised: a user comparing this total against what their operating system says the disk holds is entitled to every reason the two differ. */}} {{if .Denied}}
{{.Denied}} places could not be read, so whatever is inside them is not counted anywhere in this map. That is the operating system refusing this program, which is how it should be. {{if .DeniedPaths}}
    {{range .DeniedPaths}}
  • {{.}}
  • {{end}}
{{end}}
{{end}} {{if .Crossings}}
{{len .Crossings}} other disks or mounts start inside these folders and were not entered — they are separate storage and are not part of this map.
    {{range .Crossings}}
  • {{.}}
  • {{end}}
{{end}} {{if .Skipped}}
These are not real storage — they are the operating system pretending to be folders, and one file in them claims to be larger than every disk you own:
    {{range .Skipped}}
  • {{.}}
  • {{end}}
{{end}}
{{/* Where the user is standing, so a re-scan does not silently drop them at the root of the disk. If that folder is gone by the time the new map lands, the page says so — it never redirects quietly. */}} {{/* And WHAT they were looking at. A re-scan repeats the same scope: pressing "again" must never quietly widen what gets read. */}}
{{if ne .Scope "machine"}}

This map is your files only. Mapping the whole machine walks every drive, including folders that belong to other people who use this computer, and it covers:

    {{range .MachineRoots}}
  • {{.}}
  • {{end}}
{{end}}
{{end}}

Checked {{.CheckedAt}}.

{{end}}