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); }
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)); } }
public FilePokeTask(string filePath, IList <FilePokeReplacement> replacements, FileSystem.Path path) : base(path) { _filePath = path.GetFullPath(filePath); _replacements = replacements; }