Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 14313 invoked from network); 11 Dec 2003 19:13:14 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 11 Dec 2003 19:13:14 -0000 Received: (qmail 60761 invoked by uid 500); 11 Dec 2003 19:12:59 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 60720 invoked by uid 500); 11 Dec 2003 19:12:59 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 60704 invoked from network); 11 Dec 2003 19:12:59 -0000 Received: from unknown (HELO ignitemedia.com) (64.157.167.108) by daedalus.apache.org with SMTP; 11 Dec 2003 19:12:59 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: questions about FTP LIST processing (FTPFileListParser) Date: Thu, 11 Dec 2003 13:14:29 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: questions about FTP LIST processing (FTPFileListParser) thread-index: AcPAFLT5TDX21a+MShKzf9+oZQtetwABCmBA From: "Steve Cohen" To: "Jakarta Commons Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N How about an FTPEntryParserFactory? The problem is getting the data for the mappings? I've never looked into this. How consistent are the names returned by getSystemName() in practice? Are they locale-dependent? Once we have a fair sample of what this data looks like, it would not be hard to write a factory, at least one that works most of the time. With an eye to ant, in most ant use cases you will know what system you're connecting to and what type it is. The ant task can be rewritten with an optional parameter indicating which parser to use. I actually think this a much more common use case than the auto-detect one. Documentation of which parser to use for which system would help almost as much as autodetection. -----Original Message----- From: Jeffrey D. Brekke [mailto:jbrekke@wi.rr.com]=20 Sent: Thursday, December 11, 2003 12:11 PM To: Jakarta Commons Users List Subject: Re: questions about FTP LIST processing (FTPFileListParser) We are using getSystemName() which is returning the name of the server's OS. We are fortunate that we aren't hitting that many different ftp servers, so we can search for say, "Windows" and if its in the string, we may attempt to use the NT parser. One idea would be to have the regular expressions in a properties file. If getSystemName() matches, then use the mapping to the RE to use for parsing the entries. Then maybe we just need a *generic* entry parser and well defined RE's for autodetection and selection of parsing. Maybe we could even use RE's to match the system name. >>>>> On Thu, 11 Dec 2003 09:20:26 -0700, Chris Malley=20 >>>>> said: > You mean the OS of the FTP server, right? How do you determine the OS > of the FTP server?... > -Chris > Jeffrey D. Brekke wrote: [...] >> Currently, in our code, we just select the parser based on os. If=20 >> you have any ideas or wish to contribute to the autodetection idea=20 >> your more than welcome. > -- Chris Malley Contractor - PixelZoom, Inc. Email @ EMC:=20 > malley_chris@emc.com Voice @ EMC: (303)293-9331 x1235 > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org --=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jeffrey D. Brekke jbrekke@wi.rr.com Wisconsin, USA brekke@apache.org ekkerbj@yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org