Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftw: impl FilesystemStatistics, symlink_metadata and use it #310

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

fox0
Copy link
Contributor

@fox0 fox0 commented Oct 11, 2024

No description provided.

@fox0
Copy link
Contributor Author

fox0 commented Oct 11, 2024

#300 (comment)

@jgarzik jgarzik added the enhancement New feature or request label Oct 17, 2024
@fox0
Copy link
Contributor Author

fox0 commented Dec 1, 2024

Ready for review @jgarzik

@fox0 fox0 marked this pull request as ready for review December 1, 2024 08:26
@jgarzik jgarzik requested a review from Copilot April 2, 2025 21:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request implements the FilesystemStatistics functionality, updates how metadata is retrieved using ftw’s new API, and refactors various file operations (remove, move, list, and magic detection) to use the new API consistently.

  • tree/rm.rs, tree/mv.rs, and tree/ls.rs now consistently use ftw’s metadata and symlink_metadata functions.
  • tree/ls_util/entry.rs has been updated to use permission methods instead of raw mode bits.
  • Files under file/ have been refactored for improved API usage and to allow FilesystemStatistics integration.
  • A new file ftw/src/small_c_string.rs has been added, and Cargo.toml dependency configurations are updated accordingly.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tree/rm.rs Updated metadata parameter names and API usage for improved clarity.
tree/mv.rs Refactored metadata access and error handling with new API.
tree/ls_util/entry.rs Replaced raw mode bit checks with permission API calls.
tree/ls.rs Consistent use of new metadata API and reduced CString conversions.
ftw/src/small_c_string.rs Introduced a new utility module for small C string handling.
file/magic.rs Changed to generic path parameters for magic file processing.
file/file.rs Refactored analyze_file to return message strings for cleaner output.
Cargo.toml files Updated dependency declarations for ftw integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants