# Migrating from 0.10 to 0.11

0.11 is **additive** over 0.10. Existing 0.10 code keeps compiling and
behaving the same way. The items below are optional adjustments to
take advantage of the new surface.

## What's new in 0.11

| Addition                                   | What it enables                                                     |
|--------------------------------------------|---------------------------------------------------------------------|
| `SortOrder`                                | Explicit ordering policy — default `NameAscDirsFirst`.              |
| `Swdir::sort_order(SortOrder)`             | Pick the ordering on walks; skip the sort pass with `Filesystem`.   |
| `ScanOptions`                              | Options bag for the low-level scan (only field: `sort_order`).       |
| `scan_dir_with_options(path, &opts)`       | Sorted single-folder scan — the GUI-friendly entry point.           |
| `DirEntry::display_name() -> &OsStr`       | Borrowed label for GUI widgets — no allocation.                     |
| `DirEntry::relative_to(root) -> Option<PathBuf>` | Pure path arithmetic for tree routing keys.                   |

## Optional adjustments

| Before (0.10)                                   | After (0.11)                                                   |
|-------------------------------------------------|----------------------------------------------------------------|
| Bespoke `walk()` + sort in your own code        | `.sort_order(SortOrder::Filesystem)` to skip the sort          |
| `entry.path().strip_prefix(root).ok()`          | `entry.relative_to(root)`                                      |
| `entry.file_name()` for GUI labels              | `entry.display_name()` (borrowed `&OsStr`, no alloc)           |
| `scan_dir(path)` (raw order)                    | `scan_dir_with_options(path, &ScanOptions::default())`         |

## What didn't change

The `Swdir` builder, `WalkReport`, `FilterRule`, `Decision`,
`EntryKind`, `Recurse`, `scan_dir`, `ScanError`, `WalkError`,
`DirEntry`, and `DirNode` APIs from 0.10 are all unchanged.

The default sort order — dirs first, then files, alphabetically — was
already 0.10's behavior; 0.11 just names it (`SortOrder::NameAscDirsFirst`)
and makes it configurable.

## What's still not here

No `advanced-filter` feature. No async variant. No file watcher, no
cache, no symlink-following policy. See
[design-notes.md](../design-notes.md) for the rationale.

---

Upgrading from 0.9? Go via [from-0-9-to-0-10.md](from-0-9-to-0-10.md)
first — 0.10 was the breaking release, 0.11 only adds on top.
