Axon.ivy 7.0 - the Digital Business Platform - is out now...

I want to use Java arrays in ivyScript. But if I use myArray[myIndex] then I get an error unexpected token.

So, for example how can I do something like:

File dir = new File("myPath");
File[] fileList = dir.listFiles();

asked 03.09.2009 at 02:42

Benedict%20Groppe's gravatar image

Benedict Groppe
accept rate: 50%

Arrays are not first order objects in ivyScript. But you can work with lists everywhere you would work with arrays in Java. Note, that conversion between arrays and lists happens automatically. So, e.g. this is completely valid and good ivyScript:

File dir = new File("myPath");
List<File> fileList = dir.listFiles();

answered 03.09.2009 at 03:09

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
accept rate: 75%

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: 03.09.2009 at 02:42

Seen: 1,201 times

Last updated: 03.09.2009 at 02:42