Files/directories can be specified either as strings or as pathlib.Path objects.
To take advantage of the datafiles fixture in a test function, add datafiles as one of the test function parameters (per usual with pytest fixtures) and decorate the test function with @pytest.mark.datafiles(file1, file2, dir1, dir2, ...).
The datafiles variable in your test function is a pathlib.Path object (tmp_path) where the copied files are located.