Learn R Programming

syncdr (version 0.1.1)

filter_common_files: Filter common files in a syncdr_status object based on specified criteria

Description

This function filters common files within a "syncdr_status" object, which is the result of 'compare_directories()', according to the specified filtering criteria: Filtering is dependent on the 'dir' argument, determining the primary directory for comparison

Usage

filter_common_files(
  sync_status,
  by_date = TRUE,
  by_content = FALSE,
  dir = "left"
)

Value

A 'syncdr_status' object filtered according to the specified criteria.

Arguments

sync_status

An object of class 'syncdr_status' containing synchronization status and directory comparison results (common files only).

by_date

Logical; if TRUE, filters based on new files in the specified directory. Default is TRUE.

by_content

Logical; if TRUE, filters based on new or different files in the specified directory. Default is FALSE.

dir

Character vector specifying the primary directory for comparison ('left', 'right', or 'all').

Details

Filtering Options:

  • by_date: Filters files that are new in the specified primary directory ('left', 'right', or both).

  • by_date_and_content: Filters files that are either new or different in the specified primary directory ('left', 'right', or both).

  • by_content_only: Filters files that are different between the two directories.

See Also

compare_directories for directory comparison and sync status creation.