private IEnumerable <Command> ValidateOfCreate(ProcedureParser context, string target, string subTarget) { List <Command> ret = new List <Command>(); CustomPath path = new CustomPath(subTarget); IProcedureParsable tempTarget = CustomPath.FindAssetWithPath(path); if (tempTarget != null) { Debug.Log($"{path} already exists."); return(ret); } else { List <string> tempTargets = CustomPath.FindAssetOnlyName(path); if (tempTargets.Count > 2) { Debug.Log($"{path} : have more than one."); ret.Add(new Command(DefaultCommandType.Log, $"{path} : have more than one.", $"Create {target} in {subTarget}")); return(ret); } else if (tempTargets.Count == 0) { return(null); } else { ret.Add(new Command(DefaultCommandType.Move, tempTargets[0], subTarget)); context.ChangeAllCommandPath(path.FilePath, tempTargets[0]); return(ret); } } }