From the Xpert.ivy help I succeeded in converting a ivy File Object to an Java File Object by using... tempFile = in.someIvyFileObjectInstance.getJavaFile();

But what about the inverse way: Java File -> Ivy File? I didn't found a solution for this.

asked 12.12.2013 at 16:56

Bj%C3%B6rn's gravatar image

accept rate: 100%

The ivy file is always relative addressed (relative to the files folder of the application). See more details on the Designer Help about ivyScript File. So normally it makes no sense to generate an ivy file out of a java file if you do not want it to be saved/acessed relatively.

Possible solution to move a java file into a ivy file: 1. Create IvyFile, then move the java File to the new ivy file.

import; javaFile = new"/tmp/myFile.txt");
File ivyFile = new File("myFolder/" + javaFile.getName());
FileUtils.moveFile(javaFile, ivyFile.getJavaFile());

answered 13.12.2013 at 14:14

Christian%20Strebel's gravatar image

Christian St... ♦
accept rate: 88%

Hi Christian. Thanks for your answer. This was exactly, what I was looking for. I only changed moveFile to copyFile for my needs.

(13.12.2013 at 17:57) Björn Bj%C3%B6rn's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 12.12.2013 at 16:56

Seen: 3,755 times

Last updated: 13.12.2013 at 17:57