Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 15103 invoked from network); 7 Mar 2005 20:52:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 7 Mar 2005 20:52:34 -0000 Received: (qmail 45372 invoked by uid 500); 7 Mar 2005 20:52:31 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 44961 invoked by uid 500); 7 Mar 2005 20:52:30 -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 44948 invoked by uid 99); 7 Mar 2005 20:52:30 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from out1.smtp.messagingengine.com (HELO out1.smtp.messagingengine.com) (66.111.4.25) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 07 Mar 2005 12:52:28 -0800 Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id 7FF3FC5E6FA for ; Mon, 7 Mar 2005 15:52:24 -0500 (EST) X-Sasl-enc: BDG4ULgdjEqVAOrNTC0G0g 1110228742 Received: from [172.16.53.49] (65-65-189-5.ded.swbell.net [65.65.189.5]) by frontend2.messagingengine.com (Postfix) with ESMTP id A0D73570326 for ; Mon, 7 Mar 2005 15:52:20 -0500 (EST) Message-ID: <422CBF0A.4010700@alumni.rice.edu> Date: Mon, 07 Mar 2005 14:52:26 -0600 From: "B. K. Oxley (binkley)" Organization: The Oxley Family User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Developers List Subject: Re: [vfs] parsing uri References: <422CBDA3.7070205@elisa.fi> In-Reply-To: <422CBDA3.7070205@elisa.fi> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Rami Ojares wrote: > public FileObject findLocalFile(final File file) > throws FileSystemException > { > // TODO - tidy this up, should build file object straight from the file > return findFile(null, "file:" + > ENCODE_URI_SOMEHOW(file.getAbsolutePath()), null); > } I would do even less work than that (being as lazy as I am): public FileObject findLocalFile(final File file) throws FileSystemException { return findFile(null, file.toURI().toString(), null); } java.io.File is handy that way. :-) Cheers, --binkley --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org