From 4e7288e70dfbe96c82292e67cb92948cfcb5db28 Mon Sep 17 00:00:00 2001 From: RossanaTat Date: Mon, 4 Nov 2024 14:21:18 -0500 Subject: [PATCH] update sync sttaus file vignette --- vignettes/auxiliary-functions.Rmd | 10 +++++++ vignettes/auxiliary-functions.html | 45 +++++++++++++++++++----------- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/vignettes/auxiliary-functions.Rmd b/vignettes/auxiliary-functions.Rmd index 843bb6f..e328550 100644 --- a/vignettes/auxiliary-functions.Rmd +++ b/vignettes/auxiliary-functions.Rmd @@ -43,3 +43,13 @@ One useful auxiliary function is **`search_duplicates()`**, designed to generate search_duplicates(right, verbose = TRUE) ``` +**Save sync status file** + +Another auxiliary function is `save_sync_status`, which comes in handy to track and document the status of files within a directory over time. This function generates a summary of file synchronization details, including file hashes and modification dates, for each file in the specified directory. The summary is saved as a file within a _syncdr subdirectory, so that sync status information is easily accessible. + +The `save_sync_status` function supports various save formats (e.g., .fst, .csv, .Rds), depending on the available packages and user-specified options. + +```{r ssfile, eval = FALSE} +save_sync_status(dir_path = right) +``` + diff --git a/vignettes/auxiliary-functions.html b/vignettes/auxiliary-functions.html index b52a969..1577ab1 100644 --- a/vignettes/auxiliary-functions.html +++ b/vignettes/auxiliary-functions.html @@ -348,15 +348,16 @@

Auxiliary Functions

within the syncdr environment, containing samples common files as well as files exclusive to either directory. These toy directories are deleted every time a new session is started.

-

-# Create .syncdrenv with left and right directories
-.syncdrenv =toy_dirs()
-#> ■■■■■■■■■                         27% | ETA:  8s
-#> ■■■■■■■■■■■■■■■■■■■               60% | ETA:  5s
-

-# Get left and right directories' paths 
-left  <- .syncdrenv$left
-right <- .syncdrenv$right
+

+# Create .syncdrenv with left and right directories
+.syncdrenv =toy_dirs()
+#> ■■■■■■■ 20% | ETA: 8s■■■■■■■■■■■■■■■ 47% | ETA: 5s■■■■■■■■■■■■■■■■■ 53% | ETA:
+#> 5s■■■■■■■■■■■■■■■■■■■ 60% | ETA: 4s■■■■■■■■■■■■■■■■■■■■■■■■■ 80% | ETA:
+#> 2s■■■■■■■■■■■■■■■■■■■■■■■■■■■ 87% | ETA: 1s
+
+# Get left and right directories' paths 
+left  <- .syncdrenv$left
+right <- .syncdrenv$right

Together with toy_dirs(), you might want to use copy_temp_environment(), in order to copy the original environment and play with the various {syncdr} functions on this copied @@ -370,13 +371,25 @@

Auxiliary Functions

files. To return it invisibly, set verbose = FALSE. In this latter case, a message will still pop up to let you know when the identification of duplicates is completed.

-

-# example
-search_duplicates(right, verbose = TRUE)
-#> 
-#> ── Duplicates in '/var/folders/8y/hpp0r5m53kb_srnzjh912rmc0000gp/T/Rtmp3W6RYx/ri
-#> */C/C1.Rds
-#> */C/C1_duplicate.Rds
+

+# example
+search_duplicates(right, verbose = TRUE)
+#> 
+#> ── Duplicates in 'C:/Users/wb621604/AppData/Local/Temp/RtmpqKcuoG/right' ───────
+#> */C/C1.Rds
+#> */C/C1_duplicate.Rds
+

Save sync status file

+

Another auxiliary function is save_sync_status, which +comes in handy to track and document the status of files within a +directory over time. This function generates a summary of file +synchronization details, including file hashes and modification dates, +for each file in the specified directory. The summary is saved as a file +within a _syncdr subdirectory, so that sync status information is easily +accessible.

+

The save_sync_status function supports various save +formats (e.g., .fst, .csv, .Rds), depending on the available packages +and user-specified options.

+
save_sync_status(dir_path = right)