dagolden/path-tiny — pull request #40 by keedi (2013-05-27 04:13:10+00:00)
Title: Feature/add utime

I usually use utime core function when downloading file from Web server.
Like this:

# ...
$dir->child($file)->spew_raw( $res->{content} );

my $res = HTTP::Tiny->new->get("$url/$file");
if ( $res->{headers}{'last-modified'} ) {
my $dt = DateTime::Format::HTTP->parse_datetime(
$res->{headers}{'last-modified'},
);
utime $dt->epoch, $dt->epoch, $dir->child($file)->canonpath;
#$dir->child($file)->utime($atime, $mtime); <-- ?
}
# ...

It'll be convenient if utime is supported from Path::Tiny.
If this is not proper for Path::Tiny, just ignore this pull-req. :-)