Parses a text, file or a connection for Debian formatted parameters. A file in Debian format contains rows with parameters of the form KEY=VALUE. It is allowed to have duplicated keys.

## Static method (use this):
## System$parseDebian(text=NULL, file=NULL, keys=NULL, ...)

## Don't use the below:
# S3 method for class 'System'
parseDebian(this, text=NULL, file=NULL, keys=NULL, ...)

Arguments

text

The text to be parsed. Default value is NULL.

file

Name file, a File object or connection to be parsed. Default value is NULL.

keys

The keys (names of the parameters) to be retrieved. If NULL all fields are returned. Default value is NULL.

Either, text or file must be given.

Value

Returns a named list of parameter values.

Author

Henrik Bengtsson

See also

For more information see System.

Examples

 file <- file.path(Package("R.utils")$path, "DESCRIPTION")
 l <- System$parseDebian(file=file)
 print(l)
#> $Package
#> [1] "R.utils"
#> 
#> $Version
#> [1] "2.12.3-9010"
#> 
#> $Depends
#> [1] "R (>= 2.14.0), R.oo"
#> 
#> $Imports
#> [1] "methods, utils, tools, R.methodsS3"
#> 
#> $Suggests
#> [1] "datasets, digest (>= 0.6.10)"
#> 
#> $Title
#> [1] "Various Programming Utilities"
#> 
#> $`Authors@R`
#> [1] "c(person(\"Henrik\", \"Bengtsson\", role=c(\"aut\", \"cre\", \"cph\"), email = \"henrikb@braju.com\"))"
#> 
#> $Author
#> [1] "Henrik Bengtsson [aut, cre, cph]"
#> 
#> $Maintainer
#> [1] "Henrik Bengtsson <henrikb@braju.com>"
#> 
#> $Description
#> [1] "Utility functions useful when programming and developing R packages."
#> 
#> $License
#> [1] "LGPL (>= 2.1)"
#> 
#> $LazyLoad
#> [1] "TRUE"
#> 
#> $URL
#> [1] "https://henrikbengtsson.github.io/R.utils/,"
#> 
#> $`        https`
#> [1] "//github.com/HenrikBengtsson/R.utils"
#> 
#> $BugReports
#> [1] "https://github.com/HenrikBengtsson/R.utils/issues"
#> 
#> $NeedsCompilation
#> [1] "no"
#> 
#> $Packaged
#> [1] "2026-11-12 01:10:21 UTC; hb"
#> 
#> $Built
#> [1] "R 4.6.2; ; 2026-11-12 01:10:24 UTC; unix"
#>