2016-05-23 06:15:47 +00:00
|
|
|
import "typings-global";
|
2016-03-18 09:19:46 +00:00
|
|
|
|
|
|
|
import plugins = require("./smartfile.plugins");
|
2016-03-20 23:28:29 +00:00
|
|
|
import SmartfileChecks = require("./smartfile.checks");
|
2016-03-18 09:19:46 +00:00
|
|
|
|
2016-03-20 23:28:29 +00:00
|
|
|
export let copy = function(fromArg:string, toArg:string){
|
|
|
|
var done = plugins.q.defer();
|
|
|
|
plugins.fs.copy(fromArg,toArg,{},function(){
|
|
|
|
done.resolve();
|
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|
|
|
|
|
|
|
|
export let copySync = function(fromArg:string,toArg:string):boolean{
|
|
|
|
plugins.fs.copySync(fromArg,toArg);
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
|
|
|
export let remove = function(pathArg:string){
|
|
|
|
var done = plugins.q.defer();
|
|
|
|
plugins.fs.remove(pathArg,function(){
|
|
|
|
done.resolve();
|
|
|
|
});
|
|
|
|
return done.promise;
|
|
|
|
};
|
|
|
|
|
|
|
|
export let removeSync = function(pathArg:string):boolean{
|
|
|
|
plugins.fs.removeSync(pathArg);
|
|
|
|
return true;
|
2016-03-18 09:19:46 +00:00
|
|
|
};
|