Title: | Parse 'Java' Properties Files for 'R Service Bus' Applications |
---|---|
Description: | Allows to parse 'Java' properties files in the context of 'R Service Bus' applications. |
Authors: | Tobias Verbeke, Daan Seynaeve, based on read.dcf by R Core Development Team |
Maintainer: | Daan Seynaeve <[email protected]> |
License: | GPL-2 |
Version: | 0.0-9 |
Built: | 2024-11-01 11:15:41 UTC |
Source: | https://github.com/cran/properties |
Read a Java Properties File for Use in RSB Applications
read.properties(file, fields = NULL, encoding = "UTF-8")
read.properties(file, fields = NULL, encoding = "UTF-8")
file |
properties file, either a character string (path) or a connection |
fields |
subset of field names, if NULL, all fields are included |
encoding |
encoding of the properties file to read (default value |
list with key-value pairs
Tobias Verbeke, Daan Seynaeve
write.properties
for writing properties files
tf <- system.file("testFiles", "test0.properties", package = "properties") read.properties(tf, fields = c("key2", "key3"))
tf <- system.file("testFiles", "test0.properties", package = "properties") read.properties(tf, fields = c("key2", "key3"))
Write a Java Properties File
write.properties(file, properties, fields = NULL, encoding = "UTF-8")
write.properties(file, properties, fields = NULL, encoding = "UTF-8")
file |
properties file, either a character string (path) or a connection |
properties |
list with key-value pairs |
fields |
subset of field names, if NULL, all fields are included |
encoding |
encoding of the properties file to read (default value |
nothing; the properties are written to file
Daan Seynaeve
read.properties
for reading properties files
tf <- tempfile() write.properties(file = tf, properties = list(key1 = "value1", key2 = "value2", key3 = "value3"), fields = c("key2", "key3")) unlink(tf)
tf <- tempfile() write.properties(file = tf, properties = list(key1 = "value1", key2 = "value2", key3 = "value3"), fields = c("key2", "key3")) unlink(tf)