Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 79248 invoked from network); 1 Apr 2004 13:20:51 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Apr 2004 13:20:51 -0000 Received: (qmail 41405 invoked by uid 500); 1 Apr 2004 13:20:37 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 41329 invoked by uid 500); 1 Apr 2004 13:20:36 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 40818 invoked from network); 1 Apr 2004 13:20:32 -0000 Received: from unknown (HELO javactivity.org) (65.118.246.250) by daedalus.apache.org with SMTP; 1 Apr 2004 13:20:32 -0000 Received: from 192.168.123.60 [24.14.39.135] by javactivity.org with ESMTP (SMTPD32-7.07) id A71E11B2009A; Thu, 01 Apr 2004 07:20:30 -0600 From: Steve Cohen To: "Jakarta Commons Developers List" Subject: Re: [net] NT FTP Server & DIRSTYLE (was Re: [net] [vote] Release Commons-Net 1.2) Date: Thu, 1 Apr 2004 07:20:30 -0600 User-Agent: KMail/1.5 References: <200403281453.24107.scohen@javactivity.org> <200404010622.17900.scohen@javactivity.org> <406C146A.2050209@ops.co.at> In-Reply-To: <406C146A.2050209@ops.co.at> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404010720.30409.scohen@javactivity.org> 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 I think having a Unix parser within the NT parser is not a good design. I think the logical right place to do it is in the factory. Before I had heard about DIRSTYLE I was envisioning a process of getting a test listing when SYST returned "Windows" and trying both parsers. Or some other test. To be done in the factory. The DIRSTYLE thing offends because it seems "invasive" but how invasive is it, really? If it only affects the single connection session (which is what I would assume), it's not so bad. On Thursday 01 April 2004 7:08 am, Mario Ivankovits wrote: > Steve Cohen wrote: > >So let's here some more comments: how nasty is this DIRSTYLE toggling > > thing that some of us are just hearing about for the first time now? > > I think we could live with this, but beside this, the question is too, > how bad it is to implement. > > Currently we do have not instance of the FTPClient within the > EntryParsers, so we have to change createFileEntryParser to > a) pass a "subtype" (which depends on the host) > b) to pass the FtpClient instance to do the syst/dirstyle command. > > or > > c) We do the following withing NTFTPEntryParser > > private final FTPFileEntryParser fallback = new UnixFTPEntryParser(); > private boolean unixStyle = false; > > public FTPFile parseFTPEntry(String entry) > { > if (!unixStyle && matches(entry)) > { > FTPFile f = new FTPFile(); > ...cut.... > } > else > { > unixStyle = true; > return fallback.parseFTPEntry(entry); > } > } > > > Then we do not have to rely on the dirstyle output, and do not have to > change the interface to the DefaultFTPEntryParser. > So the ugliness (if you call the above change so ;-) is within the > initiator - the NTFTPEntryParser and the corresponding host ftp > implementation :-) > > > If you agree, i could send a patch. > > -- Mario > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org