Package 'properties'

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

Help Index


Read a Java Properties File for Use in RSB Applications

Description

Read a Java Properties File for Use in RSB Applications

Usage

read.properties(file, fields = NULL, encoding = "UTF-8")

Arguments

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 "UTF-8")

Value

list with key-value pairs

Author(s)

Tobias Verbeke, Daan Seynaeve

See Also

write.properties for writing properties files

Examples

tf <- system.file("testFiles", "test0.properties", package = "properties")
read.properties(tf, fields = c("key2", "key3"))

Write a Java Properties File

Description

Write a Java Properties File

Usage

write.properties(file, properties, fields = NULL, encoding = "UTF-8")

Arguments

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 "UTF-8")

Value

nothing; the properties are written to file

Author(s)

Daan Seynaeve

See Also

read.properties for reading properties files

Examples

tf <- tempfile()
write.properties(file = tf,
    properties = list(key1 = "value1", key2 = "value2", key3 = "value3"),
    fields = c("key2", "key3"))
unlink(tf)