Files
zed/crates/fs/Cargo.toml
T
Xin Zhao 042e0406d3 path: Clean up leftover helpers before join_path work (#65792)
## Summary

I think we are getting closer to fully making `PathStyle` a mirrored,
cross-platform counterpart to `Path` on top of #65782. Before the final
step — a separate change focused solely on the `join_path`-related
methods — this PR clears up the remaining odds and ends and removes the
leftover helpers from the `path` crate.

The `normalize_path` function is moved to `crates/util/src/paths.rs`, as
it has no cross-platform behavior, so `util` is a more appropriate home
for it.

`PathStyle::split()` is removed. Its functionality can be replaced by
`PathStyle::file_name()` plus stripping the file name from the original
path, and since there is only one caller, the migration is
straightforward.


## Testing

Mostly a refactor. For the only caller of `PathStyle::split()`, the
multi-buffer header, I manually tested that the header still renders the
file name and parent directory correctly.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- N/A
2026-10-19 14:43:05 +00:00

70 lines
1.6 KiB
TOML

[package]
name = "fs"
version = "0.1.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
[lints]
workspace = true
[lib]
path = "src/fs.rs"
doctest = false
[[test]]
name = "integration"
required-features = ["test-support"]
path = "tests/integration/fs_tests.rs"
[dependencies]
anyhow.workspace = true
async-channel.workspace = true
async-tar.workspace = true
async-trait.workspace = true
collections.workspace = true
futures.workspace = true
git.workspace = true
gpui.workspace = true
ignore.workspace = true
libc.workspace = true
log.workspace = true
parking_lot.workspace = true
paths.workspace = true
rope.workspace = true
proto.workspace = true
thiserror.workspace = true
serde.workspace = true
serde_json.workspace = true
slotmap.workspace = true
smol.workspace = true
telemetry.workspace = true
tempfile.workspace = true
text.workspace = true
util.workspace = true
notify = "9.0.0-rc.4"
trash = { git = "https://github.com/zed-industries/trash-rs", rev = "41c6c800d884a89351f3b8856d12894cccee261d" }
[target.'cfg(unix)'.dependencies]
rustix.workspace = true
[target.'cfg(target_os = "windows")'.dependencies]
is_executable.workspace = true
windows.workspace = true
dunce.workspace = true
async-std.workspace = true
[target.'cfg(target_os = "macos")'.dependencies]
unicode-normalization = "0.1"
[package.metadata.cargo-shear]
ignored = ["async-std"]
[dev-dependencies]
fs = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
git = { workspace = true, features = ["test-support"] }
[features]
test-support = ["gpui/test-support", "git/test-support", "util/test-support"]