commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <>
Subject Re: [vfs] Using VFS for FTP Access in Groovy
Date Wed, 23 Jan 2013 18:55:10 GMT

Could you try from Java to make sure you have a baseline?

Are you sure you are picking up the VFS2 packages from your non-plain-Java


On Wed, Jan 23, 2013 at 9:00 AM, Sven Johansson <>wrote:

> Hey, list.
> I'm porting a Java app to Groovy (from Play 2.0 to Grails, in fact).
> This app has a page that lists incoming file on an FTP, and I've been using
> vfs2 for this - works like a charm.
> Turns out, that when I use the exact same code in Groovy, the FileObject
> representing the root ftp folder is of type 'file' instead of folder (and
> an exception
> is thrown):
> FileObject incomingFolder = VFS.getManager().resolveFile("
> incomingFolder.getChildren();
> I get the same behavior from a standalone Groovy-script as I get running in
> Grails.
> If I however move down to vfs 1.0, the FileObject return is a 'file' when
> running the
> GroovyScript, but remains 'folder' in Grails.
> I also tried listing the contents of a subfolder - same results.
> I realize this might be considered a Groovy-specific question and might be
> better
> asked on the grails-list or stackoverflow, but I thought I'd give it a try
> here first.
> Any input on what kind of nastiness could be involved in causing this would
> be
> greatly appreciated - suggestions on how to resolve it even more so.
> Cheers/Sven

E-Mail: |
JUnit in Action, 2nd Ed: <http://goog_1249600977>
Spring Batch in Action: <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message