Commit | Line | Data |
---|---|---|
8c3eab7b | 1 | package DX::Lib::FS::Observation::FileContent; |
2 | ||
3 | use DX::Lib::FS::Fact::FileContent; | |
4 | use Moo; | |
5 | ||
6 | has path => (is => 'ro', required => 1); | |
7 | ||
9854aea0 | 8 | with 'DX::Lib::FS::Role::RunOn'; |
9 | ||
8c3eab7b | 10 | sub run { |
11 | my ($self) = @_; | |
9854aea0 | 12 | my $data = $self->_call_guts('file_content'); |
0d1a41d9 | 13 | return () unless defined($data); |
8c3eab7b | 14 | +(file_content => DX::Lib::FS::Fact::FileContent->new( |
15 | path => $self->path, | |
16 | data => $data | |
17 | )); | |
18 | } | |
19 | ||
20 | 1; |