Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D216EE942 for ; Wed, 23 Jan 2013 14:01:19 +0000 (UTC) Received: (qmail 6900 invoked by uid 500); 23 Jan 2013 14:01:16 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 4834 invoked by uid 500); 23 Jan 2013 14:01:10 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 4793 invoked by uid 99); 23 Jan 2013 14:01:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 14:01:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of johansson.sven@gmail.com designates 74.125.82.48 as permitted sender) Received: from [74.125.82.48] (HELO mail-wg0-f48.google.com) (74.125.82.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2013 14:01:03 +0000 Received: by mail-wg0-f48.google.com with SMTP id 16so1867146wgi.15 for ; Wed, 23 Jan 2013 06:00:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=mY7x6CuWIWyyioW7c8SYYxQ2YzVsH5XFB72En57J+6I=; b=NY16ZvBYZr4T5bXFTYUway9WarXBwkcfKvOC49FwVRMjpJFK46xnzHuZC7FuEMwxeO MrXCE30AyEXH/ZQNrOU7f+XtIjIc7pnWjUE4ykNGHBxocvTTYDH26FX1GEGgcMeqAxx9 WdOmGhoKfD76NFPLQmFjNvNBjm08n+hYHs9TpwarLx1JaG9Jw5Zs5hkGkLtK/+Ko8W7u 4vmb7lNlfXk0Ny/mkaygh195wIgZDgamqug1mx399fR2xUjf+j+DjgjVLSsGZWD1PaJ6 yUTKB6bqQ4JBlHT6xaC2aCzr7BgoQYNwwtfgsneq2DjfPwmhRwTS4zj0CvtFn90bmmTS fctQ== MIME-Version: 1.0 X-Received: by 10.194.238.5 with SMTP id vg5mr2777939wjc.40.1358949642865; Wed, 23 Jan 2013 06:00:42 -0800 (PST) Received: by 10.194.22.1 with HTTP; Wed, 23 Jan 2013 06:00:42 -0800 (PST) Date: Wed, 23 Jan 2013 15:00:42 +0100 Message-ID: Subject: [vfs] Using VFS for FTP Access in Groovy From: Sven Johansson To: user@commons.apache.org Content-Type: multipart/alternative; boundary=089e0122f170bb0b7104d3f51eef X-Virus-Checked: Checked by ClamAV on apache.org --089e0122f170bb0b7104d3f51eef Content-Type: text/plain; charset=ISO-8859-1 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(" ftp://myuser:mypwd@ftp.mydomain.com/"); 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 --089e0122f170bb0b7104d3f51eef--