#include <errno.h>
#include <fstream>
#include <iostream>
-#include <msp/path/utils.h>
+#include <msp/fs/dir.h>
+#include <msp/fs/stat.h>
+#include <msp/fs/utils.h>
#include "builder.h"
#include "copy.h"
#include "package.h"
using namespace std;
using namespace Msp;
-Copy::Copy(Builder &b, const Package &pkg, const Path &s, const Path &d):
+Copy::Copy(Builder &b, const Package &pkg, const FS::Path &s, const FS::Path &d):
InternalAction(b),
src(s),
dest(d)
void Copy::Worker::main()
{
- mkpath(copy.dest.subpath(0, copy.dest.size()-1), 0755);
+ FS::mkpath(FS::dirname(copy.dest), 0755);
try
{
}
// Preserve file permissions
- struct stat st=stat(copy.src);
+ struct stat st=FS::stat(copy.src);
chmod(copy.dest.str().c_str(), st.st_mode&0777);
done=true;