## Create an Amiga Disk File
## and prepare a file system on the virtual device
my_device <-
create_adf_device(
tempfile(fileext = ".adf"),
write_protected = FALSE) |>
prepare_adf_device()
## Copy the packaged R scripts of this package to the virtual device
copy_adf_entry(
system.file("R", package = "adfExplorer"),
virtual_path(my_device, "DF0:")
)
## List all entries on the virtual device
list_adf_entries(my_device, recursive = TRUE)
## Move the entire virtual device content to
## the tempdir on your physical device
dest <- file.path(tempdir(), "DF0")
dir.create(dest)
move_adf_entry(
virtual_path(my_device, "DF0:"),
dest
)
## cleanup the temp directory
unlink(dest, recursive = TRUE)
close(my_device)
Run the code above in your browser using DataLab