Returns a list of all files in a director matching $pattern
$pattern
Parameters
$path Path to directory
$path
$pattern Regex pattern (and make sure to escape with `qr` -> e.g qr/.*\.conf$/)
Returns
A list of matching files, possibly empty
Reads a file given by a $path into a string. Applies a shared lock on the file while reading. $path can also reference an open filehandle for external control over locks and cursor. If this is the case, set $path_is_fh to True.
$path_is_fh
$path Path to file
C[$path_is_fh = undef]> Set to True if $path is an open filehandle (at least for reading).
Raises
Exception if the file is somehow inaccessible or it was unable to acquire the lock
File contents as string
Writes $content to $file while having an exclusive lock. $path can also reference an open filehandle for external control over locks and cursor. If this is the case, set $path_is_fh to True.
$content
$file
$content File content
[$path_is_fh = undef] Set to True if $path is an open filehandle (write!)
[$path_is_fh = undef]
None
Tries to extract mtime from a file. If supported by the system in milliseconds resolution.
mtime of the file. If something went wrong, "0";
Utility method to split and trim a string separated by $separator.
$separator
$line Input string (e.g 'This = That ')
$line
$separator String separator (e.v '=')
Two strings. With example values given in the parameters this would be 'This' and 'That'.
To install Wireguard::WGmeta, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wireguard::WGmeta
CPAN shell
perl -MCPAN -e shell install Wireguard::WGmeta
For more information on module installation, please visit the detailed CPAN module installation guide.