Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 84493 invoked from network); 25 Jan 2002 17:47:09 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 25 Jan 2002 17:47:09 -0000 Received: (qmail 16532 invoked by uid 97); 25 Jan 2002 17:47:07 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 16516 invoked by uid 97); 25 Jan 2002 17:47:07 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 16505 invoked from network); 25 Jan 2002 17:47:06 -0000 Message-ID: <3C519A1A.9080009@liberate.com> Date: Fri, 25 Jan 2002 12:47:06 -0500 From: Peter Janes Organization: Liberate Technologies Canada Ltd. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7+) Gecko/20020117 X-Accept-Language: en-us MIME-Version: 1.0 To: Ant Developers List Subject: Re: [SUBMIT] Attrib task (chmod for Windows) References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Rob Oxspring wrote: > Why should Chmod.java and Attrib.java force an operating system > precondition? Taking this a step further, why couldn't this be handled in a more general-purpose, inclusive manner? Define attributes that can apply to files, actions for each platform to which they apply, and a factory that translates them appropriately. Ignore (or warn about) attributes that aren't supported. It then isn't a matter of "what native tool can I use on platform X", but "what does platform X support". (I haven't looked much at the VFS proposals for Ant2, but I'm guessing they handle things this way.) As a simple example, take something like