The parent
column in the manifest should not contain duplicated file paths.
This function checks if any paths are duplicated.
check_duplicate_paths( data, success_msg = "No duplicate file paths detected", fail_msg = "Duplicate file paths detected" )
data | Data to check |
---|---|
success_msg | Message indicating the check succeeded. |
fail_msg | Message indicating the check failed. |
A condition object indicating whether the data contains duplicated
file paths in the parent
column.
It is possible for this function to return false negatives if the same path
is written in different ways. For example, "~/file.txt"
and
"/Users/me/file.txt"
will be treated as different paths even if they
resolve to the same location on the user's machine. Because this function is
typically run from a Shiny app without access to the user's filesystem, it is
not possible to detect every possible duplicate path.
manifest <- data.frame( path = c("/path/to/file.txt", "/path/to/file.txt"), parent = c("syn123", "syn123") ) check_duplicate_paths(manifest)#> <error/check_fail> #> Duplicate file paths detected