]> git.tdb.fi Git - builder.git/blobdiff - source/filetarget.cpp
Replace per-file copyright notices with a single file
[builder.git] / source / filetarget.cpp
index 061a3ae20968750a70a589d21618059cb150c913..d6dcd1681c4d589cdb7976279e7acfdc032dd46c 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of builder
-Copyright © 2009-2010  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include <msp/fs/stat.h>
 #include <msp/fs/utils.h>
 #include <msp/time/utils.h>
@@ -22,11 +15,10 @@ FileTarget::FileTarget(Builder &b, const Package *p, const FS::Path &a):
 {
        builder.add_target(this);
 
-       struct stat st;
-       if(!FS::lstat(path, st))
+       if(FS::Stat st = FS::lstat(path))
        {
-               mtime = Time::TimeStamp::from_unixtime(st.st_mtime);
-               size = st.st_size;
+               mtime = st.get_modify_time();
+               size = st.get_size();
        }
 }