Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
2.5.0, 2.6.0
-
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: falseCreate 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/sourcespecifies a directory that does not exist.
e.g.: /tmp/targetcreate_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.txtspecifies a directory that does not exist.
e.g.: /tmp/targetcreate_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.txtspecifies a file.
e.g.: /tmp/target/test_copied.txtcreate_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.