Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a8ff91e
add copy, delete and exclude delete params for some functions
RossanaTat Sep 3, 2025
b782bb4
fix ordering
RossanaTat Sep 3, 2025
216fa84
change name to params
RossanaTat Sep 3, 2025
3a27fad
fix eclude_delete logic
RossanaTat Sep 4, 2025
5c5cd60
use cli progress bars
RossanaTat Sep 12, 2025
6f969e7
also in full aym sync
RossanaTat Sep 12, 2025
adc9f55
Merge pull request #9 from RossanaTat/new_wrappers
RossanaTat Nov 11, 2025
fa768bc
update README
RossanaTat Dec 2, 2025
dee706a
fix in aysm sync to right -delete in right implemnted correctly
RossanaTat Dec 2, 2025
a602716
test for display functions
RossanaTat Dec 2, 2025
371012a
test print
RossanaTat Dec 2, 2025
a24f34e
test zzz
RossanaTat Dec 2, 2025
29f8cde
test utils
RossanaTat Dec 2, 2025
9728b94
extend tests for full asym sync
RossanaTat Dec 2, 2025
bb451b1
increase code cov of action fucntions
RossanaTat Dec 3, 2025
7bf0fd9
update tests for asym sync
RossanaTat Dec 3, 2025
2f547e7
more tests for sym sync and fix to backup dir creation
RossanaTat Dec 3, 2025
106e3c1
more tests for aym sync
RossanaTat Dec 4, 2025
02aaf10
more tests to asym sync
RossanaTat Dec 4, 2025
c902a04
more tests
RossanaTat Dec 4, 2025
c05a248
Add NEWS.md
RossanaTat Dec 4, 2025
aa2db5d
init news doc
RossanaTat Dec 4, 2025
05c7ea7
update news
RossanaTat Dec 5, 2025
703e857
fixes to tests, vignettes
RossanaTat Dec 8, 2025
3ead290
update to deped on joyn 0.3.0
RossanaTat Dec 8, 2025
b3cc84a
clena code
RossanaTat Dec 8, 2025
aa99815
fix tests in aysm sync
RossanaTat Dec 8, 2025
707b3e1
update DESCRIPTION desc
RossanaTat Dec 8, 2025
d0dbe02
add cph in DESC
RossanaTat Dec 8, 2025
2677c0a
revise examples for some functions, decreasing elapsed time
RossanaTat Dec 9, 2025
6c34168
add fast option for toy dirs
RossanaTat Dec 9, 2025
d4f7edf
Add GitHub links to DESCRIPTION
RossanaTat Dec 9, 2025
ab10bbf
add github links to description
RossanaTat Dec 9, 2025
e675f73
move examples to do not test
RossanaTat Dec 10, 2025
6f6851e
test utils
RossanaTat Dec 11, 2025
e7781dc
adding more on cran comments
RossanaTat Dec 15, 2025
4cbbe16
fix date in news
RossanaTat Dec 15, 2025
95df654
fix test and news
RossanaTat Dec 15, 2025
72741d1
fix news for cran
RossanaTat Dec 29, 2025
8093162
rm tools from title
RossanaTat Jan 23, 2026
2214f95
fix style msgs example
RossanaTat Jan 23, 2026
1fbe5c1
rm dontrun
RossanaTat Jan 23, 2026
548747f
fixing use of options and of install pkgs
RossanaTat Jan 23, 2026
975ca4c
rm seed
RossanaTat Jan 23, 2026
05d25fc
make sure tests pass
RossanaTat Jan 23, 2026
423137e
Increment version number to 0.1.1
RossanaTat Jan 23, 2026
1c168ac
update version and cran doc
RossanaTat Jan 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
^pkgdown$
^\.github$
^README\.Rmd$
^cran-comments\.md$
^CRAN-SUBMISSION$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
.DS_Store
.quarto

inst/doc
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.1.0
Date: 2026-01-12 14:34:58 UTC
SHA: 72741d1bba2d7c2eda7b330c0da1263cfd31cb3e
47 changes: 29 additions & 18 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
Package: syncdr
Title: Tool for Facilitating Directory Comparison and Updating
Version: 0.0.2.9001
Title: Facilitate File Handling, Directory Comparison & Synchronization
Version: 0.1.1
Authors@R:
c(person(given = "R.Andres",
family = "Castaneda",
email = "acastanedaa@worldbank.org",
role = c("aut", "cre")),
person(given = "Rossana",
family = "Tatulli",
role = "aut",
email = "rtatulli@worldbank.org")
)
Description: An R package for directory comparison and updates. It provides tools to facilitate file handling, comparison and synchronization of directories.
c(
person(
given = "R.Andres",
family = "Castaneda",
email = "acastanedaa@worldbank.org",
role = "aut"
),
person(
given = "Rossana",
family = "Tatulli",
email = "rtatulli@worldbank.org",
role = c("aut", "cre")
),
person(
given = "Global Poverty and Inequality Data Team",
family = "World Bank",
role = "cph"
)
)
Description: Compare directories flexibly (by date, content, or both) and synchronize files efficiently, with asymmetric and symmetric modes, helper tools, and visualization support for file management.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Depends:
R (>= 2.10)
LazyData: true
Imports:
collapse,
Expand All @@ -27,17 +35,20 @@ Imports:
cli,
DT,
fs,
joyn (>= 0.1.6.9003),
joyn (>= 0.3.0),
stats,
knitr,
utils,
rstudioapi
Remotes:
github::randrescastaneda/joyn@DEV
Suggests:
fst,
withr,
rmarkdown,
mockery,
testthat (>= 3.0.0)
Depends:
R (>= 4.1.0)
Config/testthat/edition: 3
VignetteBuilder: knitr
URL: https://rossanatat.github.io/syncdr/
URL: https://rossanatat.github.io/syncdr/, https://github.com/RossanaTat/syncdr
BugReports: https://github.com/RossanaTat/syncdr/issues
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2024
YEAR: 2025
COPYRIGHT HOLDER: syncdr authors
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2024 syncdr authors
Copyright (c) 2025 syncdr authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
35 changes: 35 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# syncdr 0.1.1

# syncdr 0.1.0

Initial CRAN release.

### Directory comparison
- Added `compare_directories()` to compare two directories by modification date, file content, or date-then-content.
- Detects newer/older/same-date files as well as files present only in one directory.
- Added `print.syncdr_status()` for formatted summaries of comparison results.

### Visualization
- Added `display_sync_status()` for interactive visualization of comparison output.
- Added `display_dir_tree()` to show directory trees for one or two paths.

### Asymmetric synchronization (left → right)
- Added `full_asym_sync_to_right()` for complete one-way synchronization.
- Added partial sync helpers:
- `common_files_asym_sync_to_right()`
- `update_missing_files_asym_to_right()`
- `partial_update_missing_files_asym_to_right()`

### Symmetric synchronization
- Added `full_symmetric_sync()` for two-way synchronization with conflict handling.
- Added `partial_symmetric_sync_common_files()` for partial symmetric updates.

### Utilities
- Added `toy_dirs()` to create reproducible example directory structures.
- Added `copy_temp_environment()` for safe testing of directory operations.
- Added `search_duplicates()` for content-based duplicate detection.
- Added `save_sync_status()` to persist comparison results.

### Documentation and tests
- Added introductory and workflow vignettes.
- Added unit tests covering comparison logic, synchronization functions, directory-tree display, and duplicate detection.
45 changes: 35 additions & 10 deletions R/action_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,26 @@ copy_files_to_right <- function(left_dir,
path_to = right_dir)
}

# Copy files
mapply(fs::file_copy,
files_to_copy$path_from,
files_to_copy$path_to,
MoreArgs = list(overwrite = TRUE))
# Ensure destination subdirectories exist
unique_dirs <- unique(fs::path_dir(files_to_copy$path_to))
fs::dir_create(unique_dirs)

# progress-enabled iteration
invisible(
lapply(
cli::cli_progress_along(files_to_copy$path_from, name = "Copying files"),
function(i) {
fs::file_copy(
path = files_to_copy$path_from[i],
new_path = files_to_copy$path_to[i],
overwrite = TRUE
)
}
)
)

invisible(TRUE)

}

#' Copy files from right directory to left directory
Expand Down Expand Up @@ -88,11 +101,23 @@ copy_files_to_left <- function(left_dir,

}

# Copy files
mapply(fs::file_copy,
files_to_copy$path_from,
files_to_copy$path_to,
MoreArgs = list(overwrite = TRUE))
# Ensure destination subdirectories exist
unique_dirs <- unique(fs::path_dir(files_to_copy$path_to))
fs::dir_create(unique_dirs)

# progress-enabled iteration
invisible(
lapply(
cli::cli_progress_along(files_to_copy$path_from, name = "Copying files"),
function(i) {
fs::file_copy(
path = files_to_copy$path_from[i],
new_path = files_to_copy$path_to[i],
overwrite = TRUE
)
}
)
)

invisible(TRUE)
}
Expand Down
Loading