Closed mhpob closed 2 years ago
Closing this to branch off dev
To test:
## Access internal VLR
myVRL <- system.file("extdata", "VR2W_109924_20110718_1.vrl",
package="glatos")
## Create tempdir with spaces in the file path
temp_dir <- tempdir()
test_dir <- file.path(temp_dir, 'test dir')
dir.create(test_dir)
## Copy internal VLR to tempir
file.copy(myVRL, test_dir)
## Check files
list.files(test_dir, full.names = T)
## Run vrl2csv
vrl2csv(list.files(test_dir, full.names = T, pattern = '*.vrl'),
outDir = test_dir,
vueExePath = 'C:/Program Files (x86)/VEMCO/VUE')
## Check that CSV was created
list.files(test_dir)
readLines(list.files(test_dir, full.names = T, pattern = '*.csv'), 10)
## Delete the CSV that was just made
file.remove(list.files(test_dir, full.names = T, pattern = '*.csv'))
## Corrupt the VRL
write(c('SOMEgibberish'), list.files(test_dir, full.names = T, pattern = 'vrl'))
## Try to import
vrl2csv(list.files(test_dir, full.names = T, pattern = '*.vrl'),
outDir = test_dir,
vueExePath = 'C:/Program Files (x86)/VEMCO/VUE')
# Delete tempdir
unlink(temp_dir, recursive = T)
@chrisholbrook that was an error on my part. Changing that back to return
and moving to after the warning will have it behave normally.
Should close #137.