commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <SCo...@sportvision.com>
Subject RE: questions about FTP LIST processing (FTPFileListParser)
Date Thu, 11 Dec 2003 19:14:29 GMT
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 <ftp> 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] 
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 
>>>>> <malley_chris@emc.com> 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 
>> you have any ideas or wish to contribute to the autodetection idea 
>> your more than welcome.

> -- Chris Malley Contractor - PixelZoom, Inc.  Email @ EMC: 
> 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

-- 
=====================================================================
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


Mime
View raw message