given an output root and an initial relative path , return the output file according to the handle_existing strategy in the most basic use case , given a root directory `` input '' , a file 's relative path `` dir1/dir2/filea.docx '' , and an output directory `` output '' , the output file would be `` output/dir1/dir2/filea.docx . '' if handle_existing is set to overwrite , this will not check to see if the output already exists , and the returned file could overwrite an existing file !!! if handle_existing is set to rename , this will try to increment a counter at the end of the file name filea 2 . docx until there is a file name that does n't exist . this will return null if handleexisting == handle_existing . skip and the candidate file already exists . this will throw an ioexception if handle_existing is set to rename , and a candidate can not output file can not be found after trying to increment the file count e.g. filea 2 . docx 10000 times and then after trying 20,000 uuids . concode_field_sep Pattern FILE_NAME_PATTERN concode_field_sep Path resolveRelative concode_elem_sep boolean checkThisIsAncestorOfOrSameAsThat concode_elem_sep boolean checkThisIsAncestorOfThat concode_elem_sep Path getOutputPath
File function ( File arg0 , String arg1 , HANDLE_EXISTING arg2 , String arg3 ) { return getOutputPath ( Paths . get ( arg0 . toURI ( ) ) , arg1 , arg2 , arg3 ) . toFile ( ) ; }