Learn R Programming

multideploy (version 0.1.0)

print.file_mapping: Print method for file_mapping objects

Description

This method provides a formatted display of file mappings, showing the relationship between local files and their target repository paths with visual indicators for file existence.

Usage

# S3 method for file_mapping
print(x, max_files = 20, ...)

Value

Invisibly returns the original file_mapping object unchanged, allowing for chained operations.

Displays a formatted representation of the mapping to the console, including:

  • Total count of mapped files

  • Visual indicators showing which local files exist (checkmark) or are missing (x)

  • Source-to-target mapping for each file (limited by max_files)

Arguments

x

An object of class "file_mapping" as returned by file_mapping()

max_files

Maximum number of files to display. Default is 20.

...

Additional arguments passed to other print methods (not used)

Examples

Run this code
# Create and display a mapping
mapping <- file_mapping(
  "R/functions.R" = "R/utils.R",
  dir = system.file(package = "multideploy")
)
# The mapping is automatically printed when not assigned

# Control how many files are displayed
mapping <- file_mapping(dir = system.file(package = "multideploy"))
print(mapping, max_files = 5)  # Show only first 5 mappings

Run the code above in your browser using DataLab