package DX::Lib::FS::Observation::FileContent;

use DX::Lib::FS::Fact::FileContent;
use Moo;

has path => (is => 'ro', required => 1);

with 'DX::Lib::FS::Role::RunOn';

sub run {
  my ($self) = @_;
  my $data = $self->_call_guts('file_content');
  return () unless defined($data);
  +(file_content => DX::Lib::FS::Fact::FileContent->new(
    path => $self->path,
    data => $data
  ));
}

1;
