()
#&gt; COPYRIGHTS  DESCRIPTION INDEX       Meta        NAMESPACE   NEWS.md     
#&gt; R           help        html        libs        tests

# create a new directory
tmp &lt;- dir_create(file_temp())
tmp
#&gt; /var/folders/dt/r5s12t392tb5sk181j3gs4zw0000gn/T/RtmpmTqzrq/filed45419bda5e2

# create new files in that directory
file_create(path(tmp, &quot;my-file.txt&quot;))
dir_ls(tmp)
#&gt; /var/folders/dt/r5s12t392tb5sk181j3gs4zw0000gn/T/RtmpmTqzrq/filed45419bda5e2/my-file.txt

# remove files from the direc