Repository navigation
Replace csync C code with std::filesystem - #393
Merged
Merged
Conversation
TheOneRing
force-pushed
the
work/csync
branch
15 times, most recently
from
July 22, 2025 12:34
1ccf1f3 to
14042a8
Compare
TheOneRing
marked this pull request as ready for review
July 22, 2025 13:39
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the legacy csync C code with modern C++ std::filesystem APIs for directory traversal and file metadata operations. The main goal is to modernize the codebase by removing platform-specific C code and using standard library facilities.
Key changes include:
- Removes the entire csync VIO (Virtual I/O) layer and replaces it with std::filesystem directory iteration
- Introduces new LocalInfo class to encapsulate file metadata with proper filesystem handling
- Updates VFS interface to use std::filesystem::directory_entry instead of csync_file_stat_t
- Migrates file operation functions (getModTime, setModTime, getSize, getInode) to use std::filesystem
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/libsync/vio/* | Removes legacy csync VIO implementation files entirely |
| src/libsync/discoveryinfo.* | Adds new LocalInfo class with std::filesystem-based metadata handling |
| src/libsync/filesystem.* | Updates file system utilities to use std::filesystem APIs |
| src/libsync/discoveryphase.cpp | Replaces csync directory iteration with std::filesystem::directory_iterator |
| src/plugins/vfs//vfs_.* | Updates VFS interface to use new LocalInfo-based statTypeVirtualFile method |
| test/* | Updates tests to use new filesystem APIs and removes csync dependencies |
Comments suppressed due to low confidence (1)
src/libsync/filesystem.cpp:63
- Return type should be 'bool' not 'time_t' to match the actual setModTime function signature
while (!f1.atEnd()) {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.