file_readers: Register file readers

Description Usage Arguments Details See Also

Description

Register file extensions and reader functions for different data files. Isoreader automatically registers all built-in file readers so this function is usually only needed when registering additional readers provided for testing purposes from outside of the isoreader package. Note that file extensions are case-insensitive, i.e. a reader for .ext will also recognize .Ext and .EXT

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
iso_register_dual_inlet_file_reader(
  extension,
  func,
  description = NA_character_,
  software = NA_character_,
  cacheable = TRUE,
  post_read_check = TRUE,
  overwrite = FALSE,
  env = find_func(func)
)

iso_register_continuous_flow_file_reader(
  extension,
  func,
  description = NA_character_,
  software = NA_character_,
  cacheable = TRUE,
  post_read_check = TRUE,
  overwrite = FALSE,
  env = find_func(func)
)

iso_register_scan_file_reader(
  extension,
  func,
  description = NA_character_,
  software = NA_character_,
  cacheable = TRUE,
  post_read_check = TRUE,
  overwrite = FALSE,
  env = find_func(func)
)

Arguments

extension

the file extension (e.g. .dxf) of the data file. Must be unique otherwise different files can not automatically be matched with the appropriate file reader based on their extension.

func

the name of the function that should be used a filter reader. All file reader functions must accept a data structure argument as the first argument and return the same data structure with added data.

description

what is this file type about?

software

what is the software program that creates this file type?

cacheable

whether this file type is cacheable. If TRUE (the default), user requests to cache the file will be honored. If FALSE, this file type will never be cached no matter what the user requests.

post_read_check

whether isoreader should conduct a data integrity check after reading the file. Should always be TRUE unless there is independent data integrity checking already taking place inside the reader.

overwrite

whether to overwrite an existing file reader for the same extension

env

the environment where to find the function, by default this will be determined automatically and will throw an error if there is any ambiguity (e.g. the same function name in multiple packages) in which case it should be set manually

Details

iso_register_dual_inlet_file_reader: use this function to register file readers for dual inlet files.

iso_register_continuous_flow_file_reader: use this function to register file readers for continuous flow files.

iso_register_scan_file_reader: use this function to register file readers for scan files.

See Also

Other file_types: iso_get_supported_file_types()

Other file_types: iso_get_supported_file_types()

Other file_types: iso_get_supported_file_types()


isoreader documentation built on Nov. 19, 2021, 1:07 a.m.