Getting existing xml files path list per usm from an usms.xml file

get_files_list(
  workspace,
  usm = NULL,
  usms_file = "usms.xml",
  file_type = NULL,
  only_existing = TRUE,
  javastics = NULL,
  use_mod_files = FALSE
)

Arguments

workspace

Path of a JavaSTICS workspace (i.e. containing the STICS XML input files)

usm

Vector of usms names (optional)

usms_file

Path (including name) of a USM XML file (default: usms.xml).

file_type

Vector of file(s) type to get (optional; if not given, all types are returned, see details)

only_existing

logical, optional; if TRUE (default) only existing files list is returned, FALSE otherwise for all files

javastics

Path of JavaSTICS (optional), only needed when the plant files, general parameter files or .mod files are not in the workspace but included in the JavaSTICS distribution

use_mod_files

logical, optional; if TRUE adding the .mod files to the list FALSE otherwise (default)

Value

A named list (usms names) with files path in paths field and a logical vector in exist field indicating if the file exists or not.

Details

The possible values for file_type are: "fplt", "finit", "fclim1", "fclim2", "fstation", "ftec", "sols", "pargen", "parnew", "usms", "mod"

See also

See get_soils_list() to get all soils in a usm file, and get_usms_list() to get the list of usms.

Examples

if (FALSE) { # \dontrun{

get_files_list(
  workspace = "/path/to/workspace",
  javastics = "/path/to/JavaSTICS/folder"
)

get_files_list(
  workspace = "/path/to/workspace",
  javastics = "/path/to/JavaSTICS/folder",
  usm = c("usm1", "usm3")
)

get_files_list(
  workspace = "/path/to/workspace",
  file_type = c("finit", "ftec")
)

get_files_list(
  workspace = "/path/to/workspace",
  use_mod_files = TRUE,
  javastics = "/path/to/JavaSTICS/folder"
)
} # }