Exemplo n.º 1
0
 public static IScriptCommand DiskParseOrCreateArchive(string profileVariable     = "{Profile}", string pathVariable = "{Path}", string destVariable = "{Entry}",
                                                       IScriptCommand nextCommand = null)
 {
     return
         (CoreScriptCommands.ParsePath(profileVariable, pathVariable, destVariable,
                                       nextCommand, //FoundCommand
                                                    //NotFoundCommand
                                       CoreScriptCommands.DiskCreatePath(profileVariable, pathVariable, false, destVariable, NameGenerationMode.NoRename,
                                                                         IOScriptCommands.AssignArchiveBytes(pathVariable, "{ArchiveBytes}",
                                                                                                             CoreScriptCommands.DiskOpenStream(destVariable, "{DestStream}", FileAccess.Write,
                                                                                                                                               CoreScriptCommands.CopyStream("{ArchiveBytes}", "{DestStream}"),
                                                                                                                                               CoreScriptCommands.ParsePath(profileVariable, pathVariable, destVariable, nextCommand))))));
 }
 /// <summary>
 /// Serializable, For DiskProfile only, parse a path, if not exists create it, store to destVariable (default Entry), then call next command.
 /// </summary>
 /// <param name="pathVariable">Actual path or reference variable (if Bracketed), e.g. C:\Temp or {Path}.</param>
 /// <param name="isFolder"></param>
 /// <param name="destVariable"></param>
 /// <param name="nameGenerationMode"></param>
 /// <param name="nextCommand"></param>
 /// <returns></returns>
 public static IScriptCommand DiskParseOrCreatePath(string profileVariable     = "{Profile}", string pathVariable = "{Path}", bool isFolder = false, string destVariable = "{Entry}",
                                                    IScriptCommand nextCommand = null)
 {
     return(ParsePath(profileVariable, pathVariable, destVariable, nextCommand, CoreScriptCommands.DiskCreatePath(profileVariable, pathVariable, isFolder, destVariable,
                                                                                                                  NameGenerationMode.NoRename, nextCommand)));
 }