summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLPOBJ.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index 0d2fdea3af1..fc6f6f5edb4 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -764,6 +764,17 @@ sub remove_files {
$self->{"${type}files"} = [ @finalfiles ];
}
+sub contains_file {
+ my ($self,$fn) = @_;
+ # if the filename already contains a / do not add it at the beginning
+ my $ret = "";
+ if ($fn =~ m!/!) {
+ return(grep(m!$fn$!, $self->all_files));
+ } else {
+ return(grep(m!/$fn$!,$self->all_files));
+ }
+}
+
sub all_files {
my ($self) = shift;
my @ret = ();
@@ -1222,6 +1233,12 @@ adds or removes files from the list of C<binfiles> for the given architecture.
adds or removes files for the given type (only for C<run>, C<src>, C<doc>).
+=item C<contains_file($filename)>
+
+returns the list of files matching $filename which are contained in
+the package. If $filename contains a / the matching is only anchored
+at the end with $. Otherwise it is prefix with a / and anchored at the end.
+
=item C<all_files>
returns a list of all files of all types.