web stats
importPackage(org.apache.commons.io); - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2018, 10:25 AM
jcurry5 jcurry5 is offline
OBX.2 Kenobi
 
Join Date: May 2013
Posts: 59
jcurry5 is on a distinguished road
Default importPackage(org.apache.commons.io);

I have this in the preprocessor to move a file after it is created but I'm getting an error stating that 'File' is not defined.

importPackage(org.apache.commons.io);

var inputFile = new File(source +"\\"+ fileName );
var outputFile = new File(destination);
FileUtils.copyFile(inputFile,outputFile);


I have this working locally but when I moved it to another server I'm getting this message. I was under the impression this class is part of the Mirth library (with java.io)?

Last edited by jcurry5; 05-03-2018 at 10:37 AM.
Reply With Quote
  #2  
Old 05-03-2018, 09:19 PM
agermano agermano is offline
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 1,107
agermano is on a distinguished road
Default

java.io is not automatically imported, but you can just write
Code:
var inputFile = new java.io.File(source +"\\"+ fileName );
instead of importing it.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 05:10 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation