/usr/share/perl5/Octopussy/FS.pm is in octopussy 1.0.6-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | # $HeadURL: https://syslog-analyzer.svn.sourceforge.net/svnroot/syslog-analyzer/tags/Octopussy-1.0.6/usr/share/perl5/Octopussy/FS.pm $
# $Revision: 376 $
# $Date: 2010-08-03 00:56:05 +0100 (Tue, 03 Aug 2010) $
# $Author: sebthebert $
=head1 NAME
Octopussy::FS - Octopussy FileSystem (FS) module
=cut
package Octopussy::FS;
use strict;
use warnings;
use Readonly;
use File::Path;
use AAT::Application;
use Octopussy::Info;
Readonly my $APPLICATION_NAME => 'Octopussy';
=head1 FUNCTIONS
=head2 Chown(@files)
Changes Owner (user & group) for the files '@files'
=cut
sub Chown
{
my @files = @_;
my $user = Octopussy::Info::User();
my $list = '';
foreach my $f (@files)
{
$list .= "\"$f\" ";
}
system "chown -R $user:$user $list 2> /dev/null";
return (1);
}
=head2 Create_Directory($dir)
Creates Directory '$dir'
=cut
sub Create_Directory
{
my $dir = shift;
if (!-d $dir)
{
mkpath($dir);
Chown($dir);
}
return ($dir);
}
=head2 Directory($dir)
Returns Octopussy Directory '$dir' Value
=cut
sub Directory
{
my $dir = shift;
return (AAT::Application::Directory($APPLICATION_NAME, $dir));
}
=head2 Directories(@dirs)
Returns Octopussy Directories from '@dirs' List
=cut
sub Directories
{
my @dirs = @_;
my @list = ();
foreach my $d (@dirs)
{
push @list, AAT::Application::Directory($APPLICATION_NAME, $d);
}
return (@list);
}
=head2 File($file)
Returns Octopussy File '$file' Value
=cut
sub File
{
my $file = shift;
return (AAT::Application::File($APPLICATION_NAME, $file));
}
=head2 Files(@files)
Returns Octopussy Files from '@files' List
=cut
sub Files
{
my @files = @_;
my @list = ();
foreach my $f (@files)
{
push @list, AAT::Application::File($APPLICATION_NAME, $f);
}
return (@list);
}
=head2 File_Ext($file, $extension)
Returns File Extension
=cut
sub File_Ext
{
my ($file, $extension) = @_;
$file =~ s/(\.\w+)$/\.$extension/;
return ($file);
}
1;
=head1 AUTHOR
Sebastien Thebert <octo.devel@gmail.com>
=cut
|