OpenNMS::Release::File(3pm)

NAME
OpenNMS::Release::File - Perl extension for manipulating files

SYNOPSIS
  use OpenNMS::Release::File;

  my $file = OpenNMS::Release::File->new("path/to/foo");

DESCRIPTION
This is a perl module for manipulating files.

CONSTRUCTOR
OpenNMS::Release::File->new($path);

Given a path to a file, create a new OpenNMS::Release::File object. The path must be absolute, but does not have to exist.

METHODS

  * path
The path to the file.

  * relative_path($base)
Given a base directory, returns the path of this file, relative to that base path.

  * equals($file)
Given a file, returns true if both files have the same name and version.

  * delete
Delete the file from the filesystem.

  * copy($target_path)
Given a target path, copy the current file to that path.

  * link($target_path)
Given a target path, hard link the current file to that path.

  * symlink($target_path)
Given a target path, symlink the current file to that path, relative to the source file's location.

  * to_string
Returns a string representation of the file, suitable for printing.

AUTHOR
Benjamin Reed, <ranger@opennms.org> Matt Brozowski, <brozow@opennms.org>

COPYRIGHT AND LICENSE
Copyright (C) 2012 by The OpenNMS Group, Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.