gum-file-paths
Skill659 starsChanged 2 months agoMITView on GitHub
ToolsUtilities.FilePath comparison and normalization semantics, plus cross-platform file-move traps. Triggers: FilePath, Standardized, FullPath, comparing a computed path to one from Directory.EnumerateFiles, case-only renames.
In this repository69 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- debuggingSkill
- frb-build-verificationSkill
- frb-pixel-harnessSkill
- gum-architecture-layersSkill
- gum-bundleSkill
- gum-cliSkill
- gum-cross-platform-unificationSkill
- gum-docs-writingSkill
- gum-forms-behaviorsSkill
- gum-forms-controlsSkill
- gum-forms-default-visualsSkill
- gum-forms-itemscontrolSkill
- gum-forms-theme-importSkill
- gum-iconsSkill
- gum-issue-creationSkill
- gum-kernsmith-integrationsSkill
- gum-layout-engineSkill
- gum-layoutSkill
- gum-localizationSkill
- gum-monogame-renderingSkill
- gum-monthly-releaseSkill
- gum-project-versioningSkill
- gum-property-assignmentSkill
- gum-raylib-renderingSkill
- gum-releaseSkill
- gum-runtime-animation-chainsSkill
- gum-runtime-bindingSkill
- gum-runtime-fontsSkill
- gum-runtime-hot-reloadSkill
- gum-runtime-syntax-versionSkill
- gum-runtime-systemmanagers-initSkill
- gum-runtime-topologySkill
- gum-runtime-variable-referencesSkill
- gum-samplesSkill
- gum-serviceSkill
- gum-source-linked-projectSkill
- gum-themingSkill
- gum-tool-animationsSkill
- gum-tool-codegenSkill
- gum-tool-copy-pasteSkill
- gum-tool-delete-logicSkill
- gum-tool-dialogsSkill
- gum-tool-errorsSkill
- gum-tool-file-watchSkill
- gum-tool-font-generationSkill
- gum-tool-import-from-gumxSkill
- gum-tool-loggingSkill
- gum-tool-outputSkill
- gum-tool-pluginsSkill
- gum-tool-save-classesSkill
- gum-tool-screenshotsSkill
- gum-tool-selectionSkill
- gum-tool-tree-viewSkill
- gum-tool-undoSkill
- gum-tool-variable-gridSkill
- gum-tool-variable-referencesSkill
- gum-tool-viewmodelsSkill
- gum-unit-testsSkill
- gum-variable-deep-diveSkill
- The first 60 shown.
The file
Files
Gum File Path Semantics
ToolsUtilities.FilePath is the repo's path type. Each difference below from raw-string behavior fails
silently — wrong result, no exception.
== is case-insensitive; FullPath is case-preserving
FilePath equality compares Standardized, which is lowercased. FullPath keeps the original casing.
Any logic about a case-only rename (Foo → foo) must compare FullPath ordinally — oldPath == newPath
reports "nothing changed" for exactly the rename it needs to detect.
Standardized is for comparison only
FilePath.Standardized and StandardizedNoPathNoExtension are lowercased, so opening or reading a file through them misses on a case-sensitive file system (Linux, some macOS volumes). Do I/O through FullPath, and compare FilePaths with ==. Tool projects ban both properties via BannedSymbols.CrossPlatform.txt (RS0030).
Standardized normalizes to Path.DirectorySeparatorChar, not /
FileManager.RemoveDotDotSlash does the conversion. A hardcoded Contains("/bin/") check therefore
matches on Unix and is dead on Windows. This bites production code, not just test assertions.
Saved paths use backslashes
Project files saved on Windows store relative paths with \, which is a legal file-name character on
macOS and Linux. Convert every saved path through FilePath or FileManager.Standardize before disk
I/O, and check existence with FileManager.FileExists, not File.Exists. Content loads
(FileManager.GetStreamForFile) ask FileManager.CustomGetStreamFromFile first, then fall back to disk.
., .. and doubled separators are collapsed
FileManager.RemoveDotDotSlash (and so FilePath and the content loaders' cache keys; Standardize calls
it only for a path containing ..)
collapses every ., .. and empty segment and keeps the leading separators, so dir/./a.png,
dir//a.png and dir/a.png are one key. A leading ./ is kept: on mobile it marks an
already-resolved path (#4548). To decide whether two spellings are one file, run
both through FilePath.StandardizedCaseSensitive, and fold case only where the file system ignores it
(Windows, macOS, iOS), never via Standardized (see above); AnimationFrame.GetTextureIdentity is the example.
Paths built without RemoveDotDotSlash still keep a .: a CodeProjectRoot of "./" yields
C:\Proj\.\Screens\X.cs, which never compares equal to what Directory.EnumerateFiles returns. Code diffing
computed paths against enumerated ones must run both sides through Path.GetFullPath first.
CodeGenerationFileLocationsService output is the usual source of the computed side.
File.Move on a case-only rename is platform-divergent
Windows handles it directly; .NET pre-checks the destination on Unix and throws "already exists" on a case-insensitive macOS volume. Move through a temp name in two steps. A single-step move passes on Windows and fails only on the macOS CI leg, so a local run does not prove it.
Related
gum-unit-tests— writing path assertions that hold on both Windows and Unix CI legs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

