Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 90067 invoked from network); 8 Jun 2006 08:05:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Jun 2006 08:05:28 -0000 Received: (qmail 64031 invoked by uid 500); 8 Jun 2006 08:05:11 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 63935 invoked by uid 500); 8 Jun 2006 08:05:11 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 63824 invoked by uid 99); 8 Jun 2006 08:05:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jun 2006 01:05:10 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [212.27.42.36] (HELO smtp6-g19.free.fr) (212.27.42.36) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jun 2006 01:05:10 -0700 Received: from imp5-g19.free.fr (imp5-g19.free.fr [212.27.42.5]) by smtp6-g19.free.fr (Postfix) with ESMTP id 52E7F22701; Thu, 8 Jun 2006 10:04:49 +0200 (CEST) Received: by imp5-g19.free.fr (Postfix, from userid 33) id 45776839C; Thu, 8 Jun 2006 10:04:49 +0200 (CEST) Received: from 81.80.150.139 ([81.80.150.139]) by imp5-g19.free.fr (IMP) with HTTP for ; Thu, 08 Jun 2006 10:04:49 +0200 Message-ID: <1149753889.4487da212a8a7@imp5-g19.free.fr> Date: Thu, 08 Jun 2006 10:04:49 +0200 From: tsalm@free.fr To: Jakarta Commons Users List , tsalm@free.fr Cc: Jakarta Commons Users List Subject: Re: [FTPClient] ftpclient.getFTPFile(String path) ? References: <1149753698.4487d962d56ee@imp5-g19.free.fr> In-Reply-To: <1149753698.4487d962d56ee@imp5-g19.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.5 X-Originating-IP: 81.80.150.139 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > Hello, > > Is there a way to get a FTPFile directly by using a path ? > > Actually, I do this : > > public FTPFile getFtpFileFrom(String path) { > try { > ftpclient.changeWorkingDirectory(path) ; > FTPFile[] tabFtpFiles = ftpclient.listFiles() ; > } catch(....) {....} > > for (int i=0;i if ( tabFtpFiles[i].getName().equals(myNameFileToGet) ) return > tabFtpFiles[i]; > } > > return null; > } just a little error : public FTPFile getFtpFileFrom(String path , String myNameFileToGet) {...} sorry, Florent --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org