View source: R/device_create.R
create_adf_device | R Documentation |
These functions help you to create an empty virtual device that can be used
in Commodore Amiga emulation. create_adf_device()
simply creates a file
of the proper size (the file size represents the device capacity) and fills it
with raw
zeros. In order to use the device in the Amiga operating system, a
file system needs to be installed on the device. This can be achieved with
prepare_adf_device()
. Note that the file system itself will also consume
disk space on the virtual device.
create_adf_device(destination, type = "DD", ..., connect = TRUE)
prepare_adf_device(
dev,
name = "EMPTY",
ffs = TRUE,
international = TRUE,
dircache = FALSE,
bootable = TRUE,
...
)
## S3 method for class 'adf_device'
prepare_adf_device(
dev,
name = "EMPTY",
ffs = TRUE,
international = TRUE,
dircache = FALSE,
bootable = TRUE,
...
)
destination |
File path where the virtual device needs to be stored. |
type |
Specify the type of virtual device you wish to create.
Should be one of |
... |
Ignored for |
connect |
A |
dev |
The virtual adf device for which information needs to be obtained.
It should be of class |
name |
A |
ffs |
A |
international |
A |
dircache |
A |
bootable |
A If set to |
Either an adf_device
connection or NULL
depending on the value of
connect
.
Pepijn de Vries
## Filepath to store the virtual device:
dest <- tempfile(fileext = ".adf")
## Create a blank unformated virtual device (a double density floppy disk):
my_device <- create_adf_device(dest, "DD", connect = TRUE, write_protected = FALSE)
print(my_device)
## Format the floppy and create a file system on the device:
prepare_adf_device(my_device, name = "foobar")
print(my_device)
## don't forget to close the device connection after use:
close(my_device)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.