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

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

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

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

1;
