public DeploymentResult VerifyCanRun()
        {
            var result = new DeploymentResult();
            var to     = _path.GetFullPath(_to);

            //TODO figure out a good verify step...
            result.AddGood(Directory.Exists(to) ? "'{0}' already exists.".FormatWith(to) : Name);
            return(result);
        }
Exemple #2
0
        protected void ValidateIsFile(DeploymentResult result, string path)
        {
            if (!(new FileInfo(_path.GetFullPath(path)).Exists))
            {
                result.AddAlert("'{0}' does not exist.".FormatWith(path));
            }

            if (!_path.IsFile(path))
            {
                result.AddError("'{0}' is not a file.".FormatWith(path));
            }
        }
Exemple #3
0
 public FilePokeTask(string filePath, IList <FilePokeReplacement> replacements, FileSystem.Path path)
     : base(path)
 {
     _filePath     = path.GetFullPath(filePath);
     _replacements = replacements;
 }