Platform Support¶
Documents v0.4.1 — last reviewed 2026-07-30.
dazzle-filekit is designed for cross-platform file operations across
Windows, Linux, and macOS. Each platform gets platform-specific
optimizations where they matter (NTFS metadata on Windows, POSIX
permissions and extended attributes on Linux/macOS) while the
cross-platform API stays consistent.
Support Matrix¶
Platform |
Status |
Notes |
|---|---|---|
Windows 10 / 11 |
Tested (primary) |
NTFS; full SDDL/ctime/ADS/junction support with pywin32 |
Linux (Ubuntu, Debian, Fedora, Arch) |
Tested |
Full POSIX; extended attributes on ext4/btrfs/xfs |
WSL / WSL2 (Ubuntu-22.04) |
Tested |
Bidirectional path conversion to/from Windows; DrvFs awareness via |
macOS (Intel & Apple Silicon) |
Expected to work |
APFS/HFS+ extended attributes; skips |
“Tested” means the CI matrix runs the test suite on that platform. “Expected to work” means the code paths are present and exercised by unit tests using platform-simulation, but we don’t have a physical box in the CI loop – community bug reports welcome.
Test Counts (v0.4.1)¶
Measured from the CI matrix at 8a47ec4, not from a single dev box — the
numbers below are what [ubuntu-latest, windows-latest, macos-latest] × [3.9 … 3.13] actually reported.
Platform |
Passed |
Skipped |
|---|---|---|
windows-latest (3.12 / 3.13) |
556 |
12 |
windows-latest (3.9 – 3.11) |
555 |
13 |
ubuntu-latest (3.9 – 3.13) |
396 |
172 |
macos-latest (3.9 – 3.13) |
392 |
176 |
Skip counts differ because platform-specific features (SDDL/ctime/ADS and the
whole longpath module on Windows, xattrs/is_wsl env detection on Linux) skip
on the other platform. The Windows figure varies by one between 3.11 and 3.12
because is_junction takes a different code path on each side of
os.path.isjunction’s introduction in 3.12.
Running the suite on one platform is not sufficient. This repo has twice
shipped a failure that only a POSIX runner could see — a Windows-host-locked
probe suite in v0.3.3, and twelve Windows-semantics tests missing @win_only
in v0.4.0. tests/one-offs/run_suite_under_wsl.sh reproduces the Linux leg
from a Windows dev box for exactly this reason. The platform-simulation suite
(tests/test_paths_platform_simulation.py) exercises both Windows and
Unix branches of _prepare_path_format from a single host OS using
monkeypatch – regression protection that fires regardless of which
platform runs the suite.
Platform-Specific Features¶
Windows (NTFS)¶
Rich metadata features that require pywin32 (declared as a conditional
runtime dependency in v0.2.4 – installed automatically via
pip install dazzle-filekit):
SDDL ACL round-trip –
metadata.collect_file_metadatacaptures security descriptors as SDDL strings (JSON-safe), andapply_file_metadatarestores them viaConvertStringSecurityDescriptorToSecurityDescriptorWNTFS creation time restoration –
metadata.restore_windows_creation_time(path, created)viaSetFileTimewithFILE_WRITE_ATTRIBUTES=0x100andFILE_FLAG_BACKUP_SEMANTICSfor directoriesAlternate Data Stream (ADS) enumeration –
platform.windows.detect_alternate_streams(path)via ctypesFindFirstStreamW;has_significant_ads(path)filters out browserZone.IdentifiernoiseCorrect junction detection –
utils.validation.is_junction(path)usesDeviceIoControl(FSCTL_GET_REPARSE_POINT)to distinguishIO_REPARSE_TAG_MOUNT_POINT(true junctions) fromIO_REPARSE_TAG_SYMLINK(directory symlinks). v0.2.3 had a silent bug here that always returned False; v0.2.4 fixes it.Windows attribute flags –
is_hidden,is_system,is_readonly,is_archivebooleans alongside the raw attribute bitmaskOwner / group as
DOMAIN\Namestrings (with SID fallback)Long path handling – two distinct things, easily confused:
normalize_cross_platform_pathstrips a\\?\extended-length prefix, so a path that already carries one round-trips cleanly.The
longpathmodule (v0.4.0) is the actual remedy for exceedingMAX_PATH.\\?\only lifts the limit at the Win32 API layer; it does not help an application that builds the prefixed path and then copies it into a fixed 260-byte buffer — measured in two independent PDF readers, withLongPathsEnabled=1already set.shim_pathsites a junction at a short root instead, giving the same bytes a shorter name that any application can open. See Long-Path Shims.
Junction-safe deletion –
remove_link/longpath.remove_shimdetach a reparse point without descending into it. Necessary because a junction is indistinguishable from an ordinary directory toos.path.islink()(False),os.path.isdir()(True) andDirEntry.is_symlink()(False), so a naive recursive delete can walk through one into live data.Cross-platform path conversion – Git Bash
/c/Users/...and WSL/mnt/c/Users/...automatically convert toC:\Users\...Symbolic link creation with fallbacks –
os.symlink→ dazzlelink library →mklinkcommand (operations.create_symlink)
pywin32 is a hard dependency on Windows as of v0.2.4. The previous
best-effort attrib-command fallback is retained for environments
where pywin32 still can’t be imported, but it only covers the coarse
attribute flags, not SDDL / ctime / ADS.
Linux / Unix¶
POSIX mode preservation (
st_modecaptured and restored viaos.chmod)Owner / group preservation (
uid/gidviaos.chown, requires appropriate privileges)Extended attributes (xattrs) –
metadata._collect_unix_xattrs/_apply_unix_xattrsvia stdlibos.listxattr/getxattr/setxattr. Values are base64-encoded so the manifest stays JSON-safe. Works with Linuxuser.*/security.*/trusted.*namespaces.Symbolic link preservation –
operations.copy_tree_preserving_linkswrapsshutil.copytree(symlinks=True)so link identity is kept through directory copiesCross-platform path conversion – Windows
C:\Users\...orC:/Users/...automatically converts to/c/Users/...on LinuxWSL awareness –
utils.compat.is_wsl()detects WSL viaWSL_DISTRO_NAMEenv var or/proc/versionscan. Useful for deciding whether/mnt/c/...paths should be treated as the Windows side’s drives.
macOS (APFS / HFS+)¶
Everything Linux gets, plus:
com.apple.quarantineskip-on-restore – when applying metadata captured from a downloaded file, filekit deliberately does NOT re-apply the quarantine xattr. This prevents recovered files from triggering Gatekeeper “Are you sure you want to open this?” prompts that are irrelevant to the restore operation.Case-insensitive filesystem awareness via
is_same_fileAPFS extended attributes treated the same as Linux xattrs
Cross-Platform Path Handling¶
v0.2.4 consolidates path normalization into a single canonical function
normalize_cross_platform_path(path, *, resolve=False) with
platform-aware bidirectional conversion. The resolve=True variant
follows symlinks via Path.resolve(); the default (resolve=False)
preserves the literal link path.
Input Format |
On Windows |
On Linux/macOS |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(env var left literal if not set) |
|
|
|
|
|
– |
|
|
|
normalize_cross_platform_path(path, *, resolve=False) is the single public
entry point: resolve=True follows symlinks, the default resolve=False is
link-safe. (The normalize_path / normalize_path_no_resolve wrappers were
removed in 0.3.0 – clean break.)
Installation Variants¶
# Standard installation. Pulls in the stack bedrock dazzle-lib>=0.2.0 and the
# L0 path-identity layer unctools>=0.2.2 (both required as of 0.3.0), plus
# pywin32 on Windows.
pip install dazzle-filekit
# Development tools
pip install 'dazzle-filekit[dev]'
As of 0.3.0, UNCtools is a hard dependency (the
PathVariantResolverresolver edge), not an optional[unctools]extra. See docs/unctools-integration.md.
Testing on Your Platform¶
We welcome community testing. To verify dazzle-filekit works on your platform:
pip install 'dazzle-filekit[dev]'
pytest tests/ -v
Cross-platform cross-check (runs both Windows and WSL from a single command; useful when developing path-normalization code):
./scripts/run-cross-platform-tests.sh # both
./scripts/run-cross-platform-tests.sh --wsl-only
./scripts/run-cross-platform-tests.sh --windows-only
Please share results – especially on macOS and BSD, where we have unit-test coverage but no runtime hardware – via GitHub Discussions.