Skip to contents

Get list of paths containing files of the same name

Usage

get_file_duplicates(paths, pattern, ...)

Arguments

paths

vector of character representing full file paths

pattern

paths is matched against this pattern before the matching paths are split and analysed for duplicated files

...

arguments passed to grep, e.g. ignore.case

Examples

paths <- c("/a/b/c.exe", "/a/b/d.exe", "/A/B/c.exe", "/A/B/d.exe")
get_file_duplicates(paths, pattern = "\\.exe$")
#> Splitting paths ... ok. (0.00s) 
#> $c.exe
#> [1] "/a/b/c.exe" "/A/B/c.exe"
#> 
#> $d.exe
#> [1] "/a/b/d.exe" "/A/B/d.exe"
#>