Uploaded image for project: 'JITL - JobScheduler Integrated Template Library'
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-738

JITL Job com.sos.jitl.jobs.file.CopyFileJob/RenameFileJob should use the create_dir argument instead of create_file

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 2.5.0, 2.6.0
    • 2.5.8, 2.6.5
    • None

    Description

      Current Situation

      • The documentation for the File Operations JITL Jobs describes a Job argument create_dir:
        • create_dir
          [optional] DataType: java.lang.Boolean
          Default: false

          Create directory

          If this argument is set to "true" then the directory which is specified as the value of the target_file argument is checked for existence. If the directory does not exist then it will be created.

      • However, the File Operations JITL Jobs use the create_file argument instead to create a directory if it does not exist.

      Desired Behaviour

      • The created_dir argument should be used.
      • The create_file argument should no longer be supported.
      • The Jobs documentation should be updated to explain more details.

      Maintainer Notes

      • If the created_dir argument is set to true then the directory which is specified as the value of the target_file argument is checked for existence.
      • If target_file does not exist target_file will be created as a directory.
      • Examples:
        source_file target_file Comment
        specifies a directory
        e.g.: /tmp/source
        specifies a directory that does not exist.
        e.g.: /tmp/target
        create_dir=false : the file operations fail because the target_file directory does not exist.
        create_dir=true : target_file(/tmp/target) directory is created.
        specifies a file
        e.g.: /tmp/source/test.txt
        specifies a directory that does not exist.
        e.g.: /tmp/target
        create_dir=false : /tmp/source/test.txt is copied/moved to the file /tmp/target.
        create_dir=true : target_file(/tmp/target) directory is created and test.txt is copied/moved there.
        specifies a file
        e.g.: /tmp/source/test.txt
        specifies a file.
        e.g.: /tmp/target/test_copied.txt
        create_dir=false : /tmp/source/test.txt is copied/moved to /tmp/target/test_copied.txt(If the /tmp/target directory does not exist, it will be created).
        create_dir=true : target_file(/tmp/target/test_copied.txt) directory is created and test.txt is copied/moved there.

      Attachments

        Activity

          People

            re Robert Ehrlich
            re Robert Ehrlich
            Rajrani Upadhyay Rajrani Upadhyay
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: