|
NameConnector::Builtin::File::Path DescriptionHighly configurable file writer/reader. Parameters
Supported MethodssetWrite data to a file. $conn->set('filename', { NAME => 'Oliver', 'ROLE' => 'Administrator' });
See the file parameter how to control the filename. By default, files are silently overwritten if they exist. See the ifexists parameter for an alternative behaviour. getFetch data from a file. See the file parameter how to control the filename. my $data = $conn->get('filename');
Example my $conn = Connector::Builtin::File::Path->new({
LOCATION: /var/data/
file: [% ARGS.0 %].txt
content: Hello [% NAME %]
});
$conn->set('test', { NAME => 'Oliver' });
Results in a file /var/data/test.txt with the content Hello Oliver.
|